A federal appeals court ruled Friday that President Donald Trump had no legal right to impose sweeping tariffs but left in place for now his effort to build a protectionist wall around the American economy.

The U.S. Court of Appeals for the Federal Circuit ruled Trump wasn't legally allowed to declare national emergencies and impose import taxes on almost every country on earth, largely upholding a May decision by a specialized federal trade court in New York.

But the court's 7-4 decision tossed out a part of that ruling striking down the tariffs immediately, allowing his administration time to appeal to the Supreme Court.

Trump slammed the ruling but made it clear that his economic plans were still full speed ahead in a post to Truth Social.

'ALL TARIFFS ARE STILL IN EFFECT! Today a Highly Partisan Appeals Court incorrectly said that our Tariffs should be removed, but they know the United States of America will win in the end. If these Tariffs ever went away, it would be a total disaster for the Country. It would make us financially weak, and we have to be strong.'