BERLIN — A few weeks ago, it felt as if a trade war pitting the United States against allies like Australia, Canada and the European Union was over before it even began. The Trump administration dispensed so many temporary exemptions to steel and aluminum tariffs that many countries figured the threats were just political theater.

But with only days left before the exemptions expire and punitive tariffs take effect, it's dawning on foreign leaders that decades of warm relations with the United States carry little weight with a president dismissive of diplomatic norms and hostile toward the ground rules of international trade.

What began as a way to protect American steel and aluminum jobs has since become a cudgel that the Trump administration is using to extract concessions in other areas, including car exports to Europe or negotiations to revise the North American Free Trade Agreement with Mexico and Canada.

More from The New York Times:

In Message to Trump, Europe and Mexico Announce Trade Pact

Europe Caught in the Middle as Trump Threatens China

I.M.F. Sees Global Risk in Trump Trade Threats

As a May 1 deadline looms, the decision on whether to grant permanent exemptions to the steel and aluminum tariffs, and to whom, appears likely to come down to the whims of President Trump, who has seesawed between scrapping and rejoining global trade deals.

The European Union, the United States' biggest trading partner, indicated over the weekend that it was losing hope of reaching an agreement in the face of what many of the region's political leaders regard as unreasonable demands. While a last-minute extension of the deadline is still possible, Chancellor Angela Merkel of Germany and President Emmanuel Macron of France, who each met with President Trump in Washington last week, spoke with Prime Minister Theresa May of Britain over the weekend about enacting retaliatory tariffs if the European Union did not receive an exemption.

The German government said in a statement that Ms. Merkel, Mr. Macron and Ms. May agreed that if the tariffs go into force, "The European Union should be ready to decisively defend its interests within the framework of multilateral trade rules."

The uncertainty is sowing chaos in international supply networks. Car companies and other manufacturers do not know whether ships carrying steel may suddenly be barred from American ports.

Some countries are confident they will avoid the tariffs. Australia is treating an exemption as if it's a done deal. Brazil, which primarily exports slab steel to American manufacturers, is hoping to escape by agreeing on limited quotas for more sophisticated products. Argentina is counting on the good relationship between its president, Mauricio Macri, and Mr. Trump.

"In the conversations that we have on the issue, the positive relationships between our governments — and our presidents — certainly comes up," Miguel Braun, Argentina's trade secretary, said in an interview.

But it's unclear whether the confidence is justified. The White House has not confirmed that Australia, Brazil or Argentina will receive exemptions.

In terms of the potential disruption to the global economy, the dispute with Europe may be the most critical. The United States and the European Union account for about one-third of world trade.

Only a few years ago the United States and Europe were discussing the possibility of eliminating almost all trans-Atlantic trade barriers. Now they are stymied by fundamentally different worldviews. As the Europeans see it, Mr. Trump is demanding concessions that would make them accomplices in dismantling a postwar trade framework they hold sacred.

The Europeans want to play by the rules of the World Trade Organization; the Americans are making demands that would force the Europeans to break them.

"If we stick to the rules," said Thiess Petersen, an analyst at the Bertelsmann Foundation in Germany, "there is no chance for concessions."

German cars, a particular target of presidential ire, are one of the major sticking points.

Commerce Secretary Wilbur Ross, who has been handling talks with the European Union, has been pushing the 28-nation bloc to reduce its tariffs on imported American cars as one way of cutting its trade surplus with the United States. In a recent interview with CNBC, Larry Kudlow, the chief economic adviser, said that the United States wanted more concessions before it granted a permanent exclusion.

But if the European Union accepted the demand for lower car tariffs, international treaties would require it to apply similar terms to automobiles from all other members of the World Trade Organization.

The biggest beneficiary might be China. A member of the W.T.O., China is keen to become an auto exporter and would be thrilled to get easier access to Europe without giving up anything in return.

The Europeans are offended that they are being asked to negotiate in the first place. Cecilia Malmstrom, the European commissioner for trade, said last week that the union would discuss terms of trade with the United States only after it had received a permanent and unconditional exemption to the steel and aluminum tariffs.

"When that is confirmed by the president," Ms. Malmstrom told reporters in Strasbourg, France, "we are willing as always to discuss anything. But we are not negotiating anything under threat."

In an extension of the disconnect between the two NATO allies, the president has expressed annoyance that he can't just bypass the European Union apparatus altogether and work out deals with favored leaders like Mr. Macron. That approach would be illegal under the E.U. treaty and undermine one of the bloc's fundamental principles — that all the members act in unison on trade matters.

"I would rather deal just with France," Mr. Trump said at the White House on April 24, ahead of a visit by Mr. Macron. "The Union is very tough for us. They have trade barriers that are unacceptable."

David O'Sullivan, the European Union ambassador to the United States, said that if tariffs go into effect, "we are back to the need to pursue this with the World Trade Organization, including the possibility of imposing rebalancing counter-tariffs on equivalent U.S. exports."

The E.U. has already drawn up a list of products targeted for retaliation. They are meant to inflict maximum pain on the Republican heartland, including recreational power boats made in Tennessee, digital flight recorders made in Arizona and playing cards made in Kentucky.

But the strategy may not be effective. Business leaders who have visited Washington recently said that the president had been unmoved by protests from members of his own party.

Together, the countries seeking to extend temporary exemptions account for about half of American steel imports. The United States has already granted South Korea a permanent exemption as part of a revised trade deal.

Other countries have already been denied exemptions and started paying tariffs of 25 percent on steel and 10 percent on aluminum. They include China and Russia as well as Japan, a close ally.

Prime Minister Shinzo Abe of Japan refused to be coerced into one-on-one negotiations, instead trying to coax the United States back into the Trans-Pacific Partnership, a multicountry trade deal Mr. Trump left last year.

"Our country's position is that T.P.P is best for both of the countries, and based on that position we will be approaching the talks," Mr. Abe said in mid-April.

Mr. Trump was not persuaded. After briefly considering rejoining the trade agreement, he reversed course, writing on Twitter that the deal had "too many contingencies."

For Canada and Mexico, among the largest exporters of steel and aluminum to the United States, the Trump administration has tied their exemptions to Nafta talks. Negotiators from the three countries are scheduled to meet again on May 7 as they push to work through the major remaining disagreements and announce a revised pact.

The direct impact of the tariffs on world trade, assuming they take effect, will be minimal, economists say. Though steel plays a big role in the public imagination, it accounts for a sliver of global commerce.

Economists are more worried that a trade war will escalate. Many of the effects will be difficult to predict.

"When two elephants fight," said Miguel Ponce, head of Argentina's Center for the Study of Foreign Trade in the 21st Century, "it is the grass that suffers the most."

Jack Ewing reported from Berlin, and Ana Swanson from Washington. Reporting was contributed by Daniel Politi from Buenos Aires; Shasta Darlington from São Paulo, Brazil; Isabella Kwai from Sydney, Australia; Motoko Rich from Tokyo; and Christopher F. Schuetze from Berlin.