President Trump is once again sailing in uncharted legal and constitutional waters.

His promise to punish Mexico with escalating tariffs unless it controls what he calls the “invasion” of migrants across the southern border is premised on a law that has never been used either as a tool of immigration policy or tariffs.

Enacted in 1977, it is aimed at sanctioning foreign enemies and has been deployed to fight groups or countries hostile to the United States, such as freezing the assets of Iran after the U.S. Embassy hostage crisis; to impose embargoes; to punish foreign drug kingpins and cybercriminals; and to restrict transactions involving weapons of mass destruction. The law’s predecessor, the Trading with the Enemy Act, was passed during World War I and amended by the IEEPA because Congress thought it gave the president too much power.

“IEEPA was not designed for the imposition of tariffs,” said Jennifer Hillman, a Georgetown University law professor. “It was intended to give the President the power to impose economic sanctions when the President finds an ‘unusual and extraordinary threat’ to the national security, foreign policy or economy of the U.S. from foreign sources,” she said in an email.

“There is no reference” in the law to “presidential authority to impose tariffs,” said Edward Alden, a senior fellow at the Council on Foreign Relations. “It has been used for economic sanctions of various sorts against enemy countries, Iran, Iraq and Sudan and Libya. It’s never been used against a close ally.

“This is a considerable step beyond anything the president has done before in terms of abusing the authority delegated to him by the Congress. I think that’s why you’re seeing a reasonably significant reaction on the Hill.”

The White House has yet to present a formal justification for using the law.

Republican senators on Tuesday warned Trump administration officials that they were prepared to block the president. During a closed-door lunch, at least a half-dozen senators spoke in opposition to the tariffs, while no one spoke in support, people present who spoke on the condition of anonymity to discuss the private meeting told The Washington Post.

Use of the law requires a declaration of emergency, similar to the one declared by Trump to justify spending money on border wall construction with funds not appropriated by Congress for that purpose. There is disagreement about whether the White House can rely on that emergency declaration — currently being litigated in the federal courts — or whether the president would have to issue a new one.

The controversy over Trump’s use of emergency powers, both for wall-building purposes and tariffs, underscores the confusion created over the past century by Congress’s delegation of its authority.

The framers of the Constitution gave Congress a specific set of enumerated powers to define its sphere and limit those of the other branches. When they empowered the legislative branch to “lay and collect” duties and tariffs, that meant the president couldn’t.

Over the years, however, Congress has essentially ceded powers to the president for his use in special circumstances, often with the acquiescence or affirmation of the Supreme Court and almost always with considerable ambiguity. There is no definition of “national emergency” in any of the laws requiring the president to declare one before taking certain actions.

Several of these laws — including one used by Trump to impose tariffs on steel and aluminum — do explicitly allow unilateral tariff imposition by the president without involvement by Congress. But those statutes are, for the most part, limited tools crafted largely to respond to unfair trade practices and other perceived commercial threats, immigration not among them.

The wording of the IEEPA, “though ambiguous, was not intended to develop immigration policy through tariffs,” said Raj Bhala, a University of Kansas School of Law international trade expert. “It’s a stretch indeed,” he said.

“Immigration policy was seen as separate and always has been, and tariffs have been seen as an international trade matter.”