President Donald Trump doubled down Thursday on his pledge to require that the Keystone XL and Dakota Access pipelines be built from steel manufactured in the United States.

Speaking at the annual Republican Party retreat in Philadelphia, Trump said he added a last-minute clause that ordered the use of American-made steel to a flurry of presidential memoranda he signed this week in hopes of restarting talks with developer TransCanada to build Keystone XL and ending a delay on construction of the hotly protested Dakota Access Pipeline in North Dakota.

“I was sitting at my desk, and I’m getting ready to sign Keystone and Dakota, and I say, where is the pipe coming from? And I won’t tell you where, but you wouldn’t be happy,” Trump said. “If people want to build pipelines in our land we want the pipe to be manufactured here.”

But such a stipulation may not be legal.

The requirements may run afoul of regulations set by the World Trade Organization. The rules laid the groundwork for the post-war boom and created a bulwark against the kind of global economic collapse last seen in the 1930s. The fourth paragraph of the General Agreement on Tariffs and Trade, a 1947 trade deal that helped establish the WTO, barred its member countries from giving favor to domestic products.

The issue was last tested nearly four decades ago, when the U.S. successfully challenged Canada’s 1973 Foreign Investment Review Act, which required regulators to give favor to domestically produced product before approving an investment.

“The classic ruling on local content requirements was (ironically) made in a case brought by the United States against Canada in 1982 and finalised in 1984,” John Kemp, a London-based energy analyst who writes for Reuters, said in a column on Wednesday. “The [General Agreement on Tariffs and Trade] case brought against Canada has direct parallels to the Trump administration’s plan to require pipeline constructors to use U.S.-made steel.”

Still, the memoranda may have served more as public messaging than actual policy. For starters, the Dakota Access Pipeline is nearly complete, and it’s unclear how much, if any, U.S. steel was used. The inclusion of the line “to the maximum extent permitted by law” provides ample wiggle room for legal interpretation.

Trump campaigned hard on upending multilateral trade deals that he blames for gutting the U.S. manufacturing sector. Indeed, he signed an executive action on Monday formally withdrawing from the Trans-Pacific Partnership, a 12-country trade agreement between the U.S., Japan, South Korea, Vietnam and other Pacific nations. He then signed another meant to initiate the renegotiation of the North American Free Trade Agreement.

Presidents traditionally broadcast the signing of executive orders, which are more specific, targeted White House actions. It’s rare to do so for memoranda. But when Trump signed this week’s documents, CNN, Fox News and other cable networks showed the event on TV.

“You will see a level of quality that you are not going to see when they bring pipe from far distances, have to bring it in small chunks and then fabricate it on the land,” Trump said Thursday. “Give me a break. We can do much better than that ― and we’re going to do it much better. And it’s going to end up costing less money, believe me.”

How will Trump’s first 100 days impact you? Sign up for our weekly newsletter and get breaking updates on Trump’s presidency by messaging us here.