Activists wearing masks of, from left, French President Emmanuel Macron, German Chancellor Angela Merkel, China President Xi Jinping and European Commission President Jean-Claude Juncker protest in Berlin on Thursday. (John MacDougall/AFP/Getty Images)

In forceful remarks before Germany’s Parliament on Thursday, Chancellor Angela Merkel vowed to defend the ­international climate agreement spurned by the Trump administration, anticipating a difficult meeting of the leaders of the world’s major economies next week in Hamburg.

Despite the withdrawal of the United States, the world’s second-largest polluter, the European Union remains committed to the Paris climate accord, Merkel said. But she was blunt about the obstacles posed by the American retreat from the deal, which was signed by 195 nations in an ­attempt to forge global consensus around limiting greenhouse ­gases.

“Since the U.S. announced that it would exit the Paris agreement, we cannot expect any easy talks in Hamburg,” Merkel said, referring to the Group of 20 summit scheduled for July 7 and 8. “The dissent is obvious, and it would be dishonest to cover it up.” 

Without naming him, Merkel appeared to lament President Trump’s uncertainty about ­human-induced climate change, saying, “We can’t, and we won’t, wait until the last person on Earth is convinced of the scientific evidence for climate change.”

She said talks in Hamburg must “serve the substance and aims of the Paris accord” and insisted that she would not countenance calls to revise the agreement. She deemed the pact “irreversible.”

Her pledge echoed a rare joint statement from Germany, France and Italy rebuking Trump’s call to revise the agreement, which he said would have paralyzed American businesses and prevented the United States “from conducting its own domestic affairs.”

A chasm separates Merkel and Trump — and not just on climate — as they head into the conference in the northern German port city of Hamburg. The German leader has said she also intends to make free trade and the shared burdens of managing the global refu­gee crisis focal points of the discussions. These principles stand in uneasy relationship with the “America first” doctrine that guides Trump’s foreign policy.

One of her goals, Merkel said, will be “to send a clear signal for free markets and against isolationism,” adding, “Whoever believes that the world’s problems can be solved by isolationism and protectionism is making an enormous error.”

Merkel, who heads Europe’s most powerful economy, was preparing for the annual summit by hosting European heads of state in Berlin. In her speech Thursday morning, she reviewed the results of the European Council meeting last week in Brussels, where leaders began the protracted process of cutting Britain loose from the E.U. 

But she looked past that undertaking to affirm the strength of the European bloc — the longevity of which has been tested over the past year — and other multilateral institutions. The long-serving German chancellor was adamant that the business of strengthening the continent would not be bogged down by negotiations over the terms of the British exit.

Especially important, she said, were avenues opened up by ­Franco-German cooperation, including new ideas to stabilize the euro zone. Merkel has said she is receptive to some of the ideas offered by French President Emmanuel Macron, such as installing a single finance minister and common budget for the euro zone. 

Elmar Brok, a member of the European Parliament and a close ally of Merkel’s, said working with France is critical to each of her European objectives — from changes to the economic union to greater cooperation in security and defense. 

Trump’s election and the decision of British voters to leave the E.U. were repudiations of Merkel’s vision of a liberal, integrated West. But they may end up giving new impetus to her longer-term European aims, Brok said. 

“She has a great chance right now,” said Brok, a member of the European Parliament’s Committee on Foreign Affairs and its former chairman. “There is a new European consciousness that we have to be stronger.”

At the same time, these efforts must be coupled with a sustained commitment to a close partnership with the United States, said Jürgen Hardt, foreign policy spokesman for Merkel’s ruling coalition in Parliament. 

Hardt said Merkel’s speech was not a rejection of Trump’s government but a rebuttal of his idea that the American people are best served by an inward-looking policy.

“It’s not a fight against the U.S. but a fight for common values,” he said, noting that Germany still depends on the United States to buy its exports and defend it militarily. “We want a trustful partner in the U.S. on security but also on trade and economic issues — to the benefit of U.S. citizens and European citizens.”