The vast majority of U.S. President Donald Trump’s global tariffs were deemed illegal and blocked by the nation's trade court on Wednesday, dealing a major blow to a pillar of his economic agenda.

A panel of three judges at the U.S. Court of International Trade in Manhattan issued a unanimous ruling which sided with Democratic-led states and small businesses who had accused Trump of wrongfully invoking an emergency law to justify the bulk of his levies. The court gave the administration 10 days to "effectuate” its order, but it didn’t provide any specific directions of steps it must take to unwind the tariffs.

The order applies to Trump’s global flat tariff, elevated rates on China and others, and his fentanyl-related tariffs on China, Canada and Mexico. Other tariffs imposed under different powers, like so-called Section 232 and Section 301 levies, are unaffected, and include the tariffs on steel, aluminum and automobiles.