HAMBURG, Germany — For years the United States was the dominant force and set the agenda at the annual gathering of the leaders of the world’s largest economies.

But on Friday, when President Trump met with other leaders at the Group of 20 conference, he found the United States isolated on everything from trade to climate change, and faced with the prospect of the group’s issuing a statement on Saturday that lays bare how the United States stands alone.

Chancellor Angela Merkel of Germany, the host of the meeting, opened it by acknowledging the differences between the United States and the rest of the countries. While “compromise can only be found if we accommodate each other’s views,” she said, “we can also say, we differ.”

Ms. Merkel also pointed out that most of the countries supported the Paris accord on climate change, while Mr. Trump has abandoned it. “It will be very interesting to see how we formulate the communiqué tomorrow and make clear that, of course, there are different opinions in this area because the United States of America regrettably” wants to withdraw from the pact, she said.

Mr. Trump seemed to relish his isolation. For him, the critical moment of Friday was his long meeting with the Russian president, Vladimir V. Putin, which seemed to mark the reset in relations that Mr. Trump has been desiring for some time. It also provided Mr. Putin the respect and importance he has long demanded as a global partner to Washington.

Where previous American leaders saw their power as a benevolent force, and were intent on spreading prosperity through open markets and multilateral cooperation, Mr. Trump has portrayed himself as a nationalist, a unilateralist and a protectionist, eager to save American jobs.

What recent events have underscored, though — and especially at the G-20 — is that no nation is today large or powerful enough to impose rules on everyone else. In advancing his views, Mr. Trump has alienated allies and made the United States seem like its own private island.

Nowhere was Mr. Trump’s isolation more evident than on the issue of trade.

Mr. Trump thinks the United States has been unfairly disadvantaged by sweeping free-trade agreements like the North American Free Trade Agreement or the Trans-Pacific Partnership. He believes the steel industry in particular has been savaged by globalization.

Video

For more than 70 years, U.S. presidents have spoken as one voice on how a free and united Europe is in America’s national security interests.

Within days, he could impose restrictions and new tariffs on steel imports. Doing so would be a provocative move that could affect trade with more than a dozen major countries even while lifting the spirits of his most ardent supporters.

The tariffs could very well provoke a global trade war.

European officials here reacted astringently, threatening to retaliate. “We will respond with countermeasures if need be, hoping that this is not actually necessary,” the European Commission president, Jean-Claude Juncker, said on Friday. “We are prepared to take up arms if need be.”

Targets could include American whiskey imports. “I don’t want to tell you in detail what we’re doing,” Mr. Juncker said. “But what I would like to tell you is that within a few days — we won’t need two months for that — we could react with countermeasures.”

The Italian prime minister, Paolo Gentiloni, warned that new protectionist trade measures could bring “contagion” that would slow the growth of the world economy. “We cannot waste this moment of recovery, giving signals of protectionism or of incorrect trade behavior,” he said.

But as Mr. Trump contemplates protectionism, Europe and Japan reached a landmark free trade agreement this week. Mexico and China, two of the United States’ largest trading partners, have been mulling their own deal. The world is moving ahead regardless.

Mr. Trump and his economic team have been delaying the decision on steel in recent weeks because of disagreement among his advisers.

For weeks, trade lawyers, industry leaders and members of Congress have been anxiously awaiting a recommendation on the matter from the Department of Commerce. They view Mr. Trump’s decision as a moment that will illuminate whether he is ready to make good on his campaign promises to protect flagging American industries with tariffs.

Among those most on edge are economists, many of whom have been uneasy about Mr. Trump’s unorthodox views on trade because they have seen the damage from such actions before.

The United States imported 30.1 million metric tons of steel last year, making it the world’s largest steel importer, according to the International Trade Administration. Canada, Brazil and South Korea are the three biggest exporters to the United States, followed by Mexico and Turkey. China, the target of much anti-globalization rhetoric, is not such a major factor, at least not in steel.

Michael Strain, an economist at the conservative American Enterprise Institute, worries that retaliation from China and Europe to any steel tariffs would be particularly painful for American exporters and could lead to job cuts when Mr. Trump is trying to bolster employment and labor force participation.

While the steel industry, which Mr. Trump promised to revive, could benefit, other industries like construction and housing would probably suffer. Many of the workers in these industries and the consumers who buy their goods are likely to be the types of moderate-income voters who backed Mr. Trump.

“It will hurt the people it’s designed to help through higher prices,” Mr. Strain said. “Ultimately the economy will lose.”

On Friday, Cecilia Malmstrom, the European trade commissioner, warned the Trump administration that new tariffs would face a challenge in the World Trade Organization. A similar challenge led to a rollback of tariffs imposed by President George W. Bush in 2002.

“If global trade rules are not upheld, the E.U. will retaliate, but I cannot say now exactly how and when,” Ms. Malmstrom said. “We understand that the U.S. has concerns about overcapacity in China but we don’t think this is the right way to go, as you cannot fight protectionism with protectionism,” she added.

But Mr. Trump has even contemplated pulling the United States out of the World Trade Organization itself.

On climate, too, the United States — just a year ago a leading voice in favor of global action to reduce carbon emissions — is on its own path.

Negotiators haggled late into Friday night over language declaring that 19 of the G-20 members consider the Paris accord “irreversible,” an effort to cast the United States as an outlier for jettisoning the pact while glossing over friction about the decision.

But American officials were pressing language saying the United States would work with other nations to help them gain access to and use fossil fuels “more cleanly and efficiently.” This suggestion met with stiff resistance from President Emmanuel Macron of France.

Mr. Trump did little to paper over the disagreement, although his staff made sure that he did not have to listen to much criticism on climate change. His meeting with Mr. Putin was scheduled to begin just 15 minutes after the start of a G-20 working session on “Sustainable Growth, Climate, and Energy,” so he left after making a brief statement on the matter.

Alan Rappeport contributed reporting from Washington, Peter S. Goodman from London, and James Kanter from Brussels.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Once Dominant, U.S. Is Now Isolated at G-20. Order Reprints | Today’s Paper | Subscribe