On his recent trip to Europe, Mr. Trump waved aside a barrage of private lobbying by other heads of state to keep the United States in the agreement.

A frustrated Jean-Claude Juncker, the president of the European Commission, said he opposed “behaving as vassals of the Americans” and assailed Mr. Trump for failing to even understand the mechanics of a withdrawal, which he said could take three or four years to fulfill.

“This notion — ‘I am Trump. I am American. America first, so I’m going to get out of it.’ — that is not going to happen,” Mr. Juncker said. “We tried to make that clear to Mr. Trump in clear, German principal clauses in Taormina, but it would appear that he did not understand.”

He added, “Not everything in international agreements is fake news.”

Mr. Trump has shown a willingness to shift direction up until the moment of a public announcement. He met on Wednesday with Secretary of State Rex W. Tillerson, who has advocated that the United States remain a part of the Paris accord. Other advisers pressing Mr. Trump to remain were furiously making their case.

In the past, such appeals have worked. In April, Mr. Trump was set to announce a withdrawal from the North American Free Trade Agreement, but at the last minute changed his mind after intense discussions with advisers and calls from the leaders of Canada and Mexico. Last week, a senior administration official said Mr. Trump would use a speech in Brussels to explicitly endorse NATO’s Article 5 mutual defense provision, which states that an attack on one NATO member is an attack on all. He did not.

The exit of the United States, the world’s largest economy and second-largest greenhouse gas polluter, would not dissolve the 195-nation pact, which was legally ratified last year, but it could set off a cascade of events that would have profound effects on the planet. Other countries that reluctantly joined the agreement could now withdraw or soften their commitments to cutting planet-warming pollution.