The Supreme Court will soon rule on whether Trump’s aggressive and impulsive use of tariffs is an illegal usurpation of Congressional authority spelled out clearly in Article I of the Constitution. The right to levy tariffs is reserved to Congress, except where explicitly delegated to the president.

Congress has done this in three laws, each with precise provisions. For the most part, Trump has relied on the most far-fetched of these delegations, the International Emergency Economic Powers Act (IEEPA) of 1977, which was enacted, ironically, to limit the president’s broader discretionary powers in the 1917 Trading with the Enemy Act.

Under IEEPA, a president may declare a national emergency to address an “unusual and extraordinary threat” from a foreign source. The emergency declaration allows the president to freeze assets, block transactions, and regulate or prohibit imports.

Related: The reactionary Supreme Court has given Congress’s power of the purse to Trump

But Trump has used IEEPA as an all-purpose grant of executive authority to take over all tariff policy, and raise and lower tariffs at his pleasure. On several occasions, by his own admission, he has used tariffs as a tool of foreign policy in ways that have nothing to do with any supposed economic emergency. In the case of Brazil, where the US has a trade surplus, he quintupled tariffs explicitly to punish that nation for prosecuting his crony, former President Jair Bolsonaro.

In August, the US Court of Appeals for the Federal Circuit ruled that IEEPA does not grant the authority to impose broad tariffs in the way Trump is using it. Via the now-familiar use of the shadow docket, the Supreme Court allowed Trump’s tariffs to remain in place until a full hearing is held. Oral arguments are scheduled for November 5.

In the meantime, the administration has made backup plans in case it loses the IEEPA case. Two other provisions of law grant the executive branch some tariff authority. Under Section 301 of the Trade Act of 1974, the US trade representative (USTR) may launch an investigation to assess complaints of unfair trade practices such as subsidies, quotas, and intellectual property theft. Based on the findings, the USTR can recommend sanctions, including tariffs and quotas.

More from Robert Kuttner

Similarly, under Section 232 of the Trade Expansion Act of 1962, the president is given  authority to restrict imports that threaten national security. But in both cases, there are procedures to be followed, and neither allows the president to operate on whim, as Trump has done.

On September 30, Jamieson Greer, Trump’s US trade representative, gave a trucculent speech at the New York Economic Club basically blowing off the Supreme Court. Greer declared that even if the high court were to rule that Trump’s attempted power grab of all tariff authority under IEEPA was illegal, the administration would fall back to another authority to impose tarffs, such as sections 301 and 232. “We feel very confident that the president’s trade policy … will win at the court,” he said. “And if it doesn’t, we’ll be able to have the same effect.”

In some cases, such as steel and aluminum tariffs, the USTR has been playing things by the book with hearings and findings. But unless the Supreme Court is a total patsy for Trump (which is always possible) it’s clear that the other trade laws do not permit Trump to do whatever he likes, on impulse, any more than IEEPA does.

The trade case, and other pending Supreme Court cases on such questions as his ability to fire a Federal Reserve governor or to punish universities by withholding funds, are about Trump’s attempts to rule as a dictator. As Trump becomes more extreme in his power grabs, it remains to be seen whether the Roberts Court will decide that it’s time to serve as a restraint.

The tariff case could produce a mixed verdict. In some instances involving genuinely predatory trade practices by other nations such as China, Trump is acting within his authority. In other cases, such as using “economic emergency” tariffs to punish Brazil for reasons that have nothing to do with economics, the court could rein him in. Any restraint would help.