The final statement from Group of 20 leaders on Saturday exposed a divide between the United States and other G20 members on the Paris accord aimed at combating climate change.
German Chancellor Angela Merkel, hosting the two-day G20 summit, said she was pleased all club members besides the United States had agreed the Paris climate accord was irreversible.
"I think it's very clear that we could not reach consensus, but the differences were not papered over, they were clearly stated," Merkel told reporters at the end of the two-day meeting.
She said she did not share the view of British Prime Minister Theresa May who said on Friday she thought Washington could decide to return to the climate agreement.
In the final communique, the G20 leaders took note of the United States' decision to withdraw from the landmark accord.
"The leaders of the other G20 members state that the Paris Agreement is irreversible," the statement read.
On trade, another sticking point, the leaders agreed they would "fight protectionism including all unfair trade practices and recognize the role of legitimate trade defense instruments in this regard."
"You have been amazing and you have done a fantastic job. Thank you very much chancellor," he said.
Merkel chose to host the summit in Hamburg, the port city where she was born, to send a signal about Germany's openness to the world, including its tolerance of peaceful protests.
As the leaders met on Saturday, police helicopters hovered overhead. Overnight, police clashed with anti-capitalist protesters seeking to disrupt the summit.
In the early morning, heavily armed police commandos moved in after activists had spent much of Friday attempting to wrest control of the streets from more than 15,000 police, setting fires, looting and building barricades.
The summit is being held only a few hundred meters from one of Germany's most potent symbols of left-wing resistance, a former theater called the "Rote Flora" which was taken over by anti-capitalist squatters nearly three decades ago.
Police said 200 officers had been injured, 134 protesters temporarily detained and another 100 taken into custody.