A U.S. trade court dealt President Donald Trump’s sweeping tariffs a major blow late Wednesday, blocking most of the plan after concluding the president overstepped his authority by imposing across-the-board duties on imports from U.S. trading partners.

The Court of International Trade ruled Congress has exclusive authority to regulate commerce with other countries, and the president’s emergency powers cannot be imposed to unilaterally safeguard the U.S. economy.

“The court does not pass upon the wisdom or likely effectiveness of the President’s use of tariffs as leverage,” a three-judge panel said in issuing a permanent injunction on tariffs levied by Trump since January. “That use is impermissible not because it is unwise or ineffective, but because [federal law] does not allow it.”

The judges, who invalidated all of Trump’s orders on tariffs since January, alsoย ordered the Trump administration to issue new orders within 10 days. The Trump administration immediately appealed.

More legal challenges are pending against Trump’s tariffs, which have wildly varied in percentage and timing the past several months.

Democratic Oregon Attorney General Dan Rayfield is leading the state’s lawsuit, which calls the tariffs unlawful, reckless and economically devastating. “This (trade court) ruling reaffirms that our laws matter, and that trade decisions can’t be made on the presidentโ€™s whim,” Rayfield said in a statement.

The judgesโ€™ decision should come as especially great relief to tech companies that found themselves caught in the crosshairs of government trade actions to stifle artificial intelligence (AI) innovation in China. The resultant chaos has led to severely disrupted global trade flows and supply chains, disputed production and staffing, roiled financial markets, and massive corporate write-offs.