Costco is suing the Trump administration to stop and recover tariffs the president imposed earlier this year under the International Emergency Economic Powers Act (IEEPA), arguing the federal government overstepped its legal authority.

The wholesale giant argues that IEEPA — a 1977 U.S. law that gives the president authority to “regulate a variety of economic transactions following a declaration of national emergency” — does not authorize Trump to impose tariffs.

“IEEPA grants the president certain powers, but they ‘may only be exercised to deal with an unusual and extraordinary threat with respect to which a national emergency has been declared for purposes of this chapter and may not be exercised for any other purpose,’” Costco said in the complaint, quoting the law.

The law also “does not use the word ‘tariff’ or any term of equivalent meaning,” the lawsuit states. And despite being amended several times since it was first enacted, “it has never been amended to authorize, or used by any other president to impose, tariffs.”

Earlier this year, both the U.S. Court of International Trade in Manhattan and the Federal Circuit in Washington ruled in a different case that Trump’s controversial import taxes were illegal.

The case is now before the Supreme Court. When it was argued early last month, several justices expressed doubts about the president’s authority to impose tariffs on goods from nearly every country.

If the nation’s high court rules against the administration, importers may be entitled to refunds for tariffs they’ve already paid.

While it’s unclear whether refunds will be granted or how much companies might receive, experts say some businesses are acting proactively.

“The possibility has prompted many companies — including Costco — to file actions in the U.S. Court of International Trade to get in line, so to speak, for potential refunds,” said Brent Skorup, a legal fellow at the libertarian Cato Institute.

In the lawsuit filed with the U.S. Court of International Trade on Nov. 28, Costco said it’s seeking a refund now “to ensure that its right to a complete refund is not jeopardized.”

Without disclosing how much it is seeking in refunds, the nation’s largest warehouse club expressed concern that it may not recover the tariffs it’s already paid once Customs and Border Protection liquidates them on an estimated basis, a process Costco says will begin Dec. 15.