WASHINGTON—President Trump’s use of national security concerns to justify his recently announced tariffs on steel and aluminum imports could set a dangerous legal precedent for global trade, according to some experts.

Critics have made the economic case against the tariffs, warning that the move could end up hurting U.S. consumers more than helping domestic steel and aluminum manufacturers. The White House’s chief economic advisor, Gary Cohn, resigned Tuesday after feuding publicly with Trump over the tariffs.

But Trump is also drawing fire from a legal perspective—for stretching the legal justification for his action and potentially threatening a major showdown with the World Trade Organization.

“When [President] Bush passed his steel tariffs in 2002, he used mechanisms already in place to respond to a surge of imports using an orderly process,” said Simon Lester, a trade analyst at the libertarian Cato Institute. “Now, with Trump using national security, it’s being done an entirely different way. There’s a danger to that.”

The WTO allows nations to carve out exemptions from trade agreements when those nations determine that protecting an industry is a matter of national security. Most countries have avoided using this exemption out of fear it could lead to a chain reaction of other countries using national security to justify their own trade protections, Lester said.

“Sure, we could cite national security to make our own fighter jets, but steel and aluminum are much broader categories,” he said. “Other countries could use it to justify tariffs on something as broad as food, or clothing. It could spiral out of control.”

The WTO sent an email to the Associated Press Friday echoing a similar warning.

“The potential for escalation is real as we have seen from the initial responses,” said Roberto Azevedo, director-general of the WTO.

If Trump were to impose the tariffs, they would likely end up being reviewed by an international WTO panel. If the WTO were to rule that the United States was not allowed to implement the tariffs, the Trump administration  could choose to simply ignore the ruling. If so, the WTO could compel its other members to respond to the United States with retaliatory tariffs, setting off a global trade conflict.

“If the WTO rules against a country when it comes to that country’s national security, that could set us on a really bad path down the road,” said Claude Barfield, a trade analyst at the American Enterprise Institute, a conservative think tank. “Trump has been a skeptic of the WTO anyway, so if he got that kind of ruling it’s definitely possible he would just defy the WTO.”

But others said the United States was well within its rights to put its own national and economic security first. Tony Montana, spokesman for United Steelworkers, a union which represents steelworkers in the United States and Canada, said steel and aluminum protections were crucial for the national security.

“Allowing our foreign trade partners (which may or may not be market economies) to continue unfairly and often illegally dumping their products in the U.S. poses an existential threat to  an industry that is absolutely essential to our national defense,” he said.

Trump linked the tariffs to the North American Free Trade Agreement negotiations on Monday, saying that he would consider removing tariffs on Canadian and Mexican steel and aluminum if those countries were to renegotiate NAFTA. Barfield said that by connecting the tariffs to NAFTA, the Trump administration was weakening its own case on national security.

“The administration has undercut its own case, because these NAFTA negotiations have nothing to do with national security,” Barfield said. “And the WTO panel will look at the administration’s motives. This shows that the tariffs are not really about security, but rather are a trade tool used to beat Mexico and Canada into submission.”

Despite the pushback, Trump doubled down on his support for the tariffs at his press conference with Swedish Prime Minister Stefan Löfven on Tuesday. Trump said the United States needed to respond to “very unfair” treatment from the European Union on trade.

“The United States has been taken advantage of by other countries, both friendly and not so friendly,” said Trump. “The European Union has been particularly tough on the United States—they make it almost impossible for us to do business with them.”