HAMBURG, Germany — The growing international isolation of the United States under President Trump was starkly apparent Friday as the leaders of major world economies mounted a near-united opposition front against Washington on issues ranging from climate to free trade.

At a gathering of the Group of 20 world economic powers – normally a venue for displays of international comity – there were tough clashes with the U.S. and even talk of a possible trans-Atlantic trade war.

The tensions were a measure of Trump’s sharp break with previous U.S. policies. They were also a signal of Washington’s diminished clout, as the leaders of the other 19 nations gathered in Hamburg mulled whether to fix their signatures to statements that would exclude Trump or to find some sort of compromise. Two European officials said they were leaning toward a united front against Washington.

German Chancellor Angela Merkel, whose difficult job it was to bridge the differences, made little attempt to paper over the disagreements after the first day of meetings.

“The discussions are very difficult. I don’t want to talk around that,” Merkel said.

She described the view of most participants that “we need free but also fair trade,” a rejection of Trump’s skepticism about the value of sweeping free-trade agreements. And she predicted that the lower-level officials charged with negotiating a final statement deep into the night “had a lot of work ahead of them.”

Some of the clearest divides had to do with climate change after Trump’s decision to pull the United States from the Paris climate accord. There were sharp warnings about U.S. steel policy as Trump mulls restrictions on imports.

The summit was also the venue for the first face-to-face meeting between Trump and Russian President Vladimir Putin, who is accused by U.S. intelligence agencies of intervening in November’s election to swing it in favor of the Republicans. The two leaders sat for a two-hour-and-sixteen-minute meeting, which started out with warm jokes between the pair but ended with a disagreement about whether Trump accepted Putin’s denial that his country had interfered in the election.

In one of the most consequential decisions of his young administration, Trump could within days impose the restrictions on steel, a move that could impact trade with more than a dozen major countries.

“We will respond with countermeasures if need be, hoping that this is not actually necessary,” European Commission President Jean-Claude Juncker told reporters, adding figuratively: “We are prepared to take up arms if need be.”

Juncker warned that Europe would respond in days, not months, if Trump announces the restrictions.

The comments made for a remarkable display of disharmony as the meeting got underway, and it was a reflection of how European officials not only do not fear Trump but see much to gain from opposing him. Trump is deeply unpopular in Europe, and politicians here can get a boost when they emphasize their differences.

Commerce Secretary Wilbur Ross is near completion of a multi-month review of U.S. steel imports, and he has said that the large amount of steel imported by the United States puts national security at risk because it has weakened the domestic steel industry. The White House is considering using this rationale to impose new restrictions, either by imposing tariffs or quotas, or a combination of the two.

Ahead of the summit, the White House was close to making a decision, but top Trump administration advisers slowed the process down at the last minute, persuading Trump to meet with other world leaders at the G-20 before deciding how to proceed.

The Trump administration has blamed China for what it says is a “global overcapacity” of steel, essentially arguing that the Chinese government is subsidizing the steel industry and allowing its producers to create and export so much steel that it drives down prices and makes it difficult for U.S. producers to compete.

But any U.S. restriction on steel imports would have a relatively muted effect on China, and it would hit other countries much harder.

The largest exporters of steel to the United States are Canada, Brazil, South Korea, Mexico and Turkey, according to IHS Global Trade Atlas. Germany also has a large steel industry, and German officials have been particularly concerned about what a unilateral move to impose restrictions on steel imports to the U.S. might mean.

Trump and Merkel spoke about trade and steel a few days ago, a reflection of how seriously both sides consider any new action on the issue.

U.S. negotiators were pressing their international counterparts on what they described as a global glut of steel production in the hopes they can reach an agreement by Saturday on how to curb it, a U.S. official said. The official said the issue was consuming significant time.

Other countries have also stood in opposition to Trump’s drive to erect trade barriers.

When there is protectionism, “the entire international economy shrinks,” Japanese foreign ministry spokesman Norio Maruyama told reporters.

Japanese Prime Minister Shinzo Abe told leaders that all countries in the global economy must abide by “free and fair rules, and these rules need to be maintained at the high level, and need to be respected,” Maruyama said.

In a Twitter post Friday, Trump wrote of the G-20 that “I will represent our country well and fight for its interests! Fake News Media will never cover me accurately but who cares!”

After the conclusion of the first day of meetings, Treasury Secretary Steven Mnuchin said that Trump’s interactions with foreign leaders were going well.

“We’ve had very productive economic meetings,” he told reporters at the summit. “There’s been very substantive issues discussed,” he said without going into more detail.

The European Union has pointed proudly at a wide-ranging trade deal with Japan, concluded Thursday, as a retort to Trump’s protectionist inclinations.