The leaders from the world's leading economies have broken with US President Donald Trump on climate policy at the G20 summit in Germany, in a rare public admission of disagreement and blow to multilateral cooperation.
German Chancellor Angela Merkel, keen to show off her skills as a mediator two months before a German election, achieved her primary goal at the meeting in Hamburg, convincing her fellow leaders to support a single communique with pledges on trade, finance, energy and Africa.
But the divide between Mr Trump, elected on a pledge to put "America First", and the 19 other members of the club, including countries as diverse as Japan, Saudi Arabia and Argentina, was stark.
Last month Mr Trump announced he was pulling the United States out of a landmark international climate accord clinched two years ago in Paris.
"In the end, the negotiations on climate reflect [the] dissent [of the G20] all against the United States of America," Mrs Merkel told reporters at the end of the meeting.
"And the fact that negotiations on trade were extraordinarily difficult is due to specific positions that the United States has taken."
The summit, marred by violent protests that left the streets of Hamburg littered with burning cars and broken shop windows, brought together a volatile mix of leaders at a time of major change in the global geo-political landscape.
Mr Trump's shift to a more unilateral, transactional diplomacy has left a void in global leadership, unsettling traditional allies in Europe and opening the door to rising powers like China to assume a bigger role.
Tensions between Washington and Beijing dominated the run-up to the meeting, with the Trump administration ratcheting up pressure on President Xi Jinping to rein in North Korea and threatening punitive trade measures on steel.
'Positive chemistry': Trump meets Putin
Mr Trump met Russian President Vladimir Putin for the first time in Hamburg, a hotly anticipated encounter after the former real estate mogul promised a rapprochement with Moscow during his campaign, only to be thwarted by accusations of Russian meddling in the vote and investigations into the Russia ties of Trump associates.
Mr Putin said at the conclusion of the summit on Saturday that Mr Trump had quizzed him on the alleged meddling in a meeting that lasted over two hours but seemed to have been satisfied with the Kremlin leader's denials of interference.
Mr Trump had accused Russia of destabilising behaviour in Ukraine and Syria before the summit. But in Hamburg he struck a conciliatory tone, describing it as an honour to meet Mr Putin and signalling, through Secretary of State Rex Tillerson, that he preferred to focus on future ties and not dwell on the past.
"It was an extraordinarily important meeting," Mr Tillerson said, describing a "very clear positive chemistry" between Mr Trump and the former KGB agent.
In the final communique, the 19 other leaders took note of the US decision to withdraw from the Paris climate accord and declared the deal as "irreversible".
For its part, the United States injected a contentious line saying that it would "endeavour to work closely with other countries to help them access and use fossil fuels more cleanly and efficiently".
French President Emmanuel Macron led a push to soften the US language.
"There is a clear consensus absent the United States," said Thomas Bernes, a distinguished fellow at the Centre for International Governance Innovation. "But that is a problem. Without the largest economy in the world how far can you go?"
Jennifer Morgan, executive director at Greenpeace, said the G19 had "held the line" against Trump's "backward decision" to withdraw from Paris.
On trade, another sticking point, the leaders agreed they would "fight protectionism including all unfair trade practices and recognise the role of legitimate trade defence instruments in this regard".
The leaders also pledged to work together to foster economic development in Africa, a priority project for Merkel.
Mrs 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.
It was held only a few hundred metres from one of Germany's most potent symbols of left-wing resistance, a former theatre called the Rote Flora, which was taken over by anti-capitalist squatters nearly three decades ago.
Over the three days of the summit, radicals looted shops, torched cars and lorries. More than 200 police were injured and some 143 people have been arrested and 122 taken into custody.
Some of the worst damage was done as Mrs Merkel hosted other leaders at for a concert and lavish dinner at the Elbphilharmonie, a modernist glass concert hall overlooking the Elbe River.
Mrs Merkel met police and security force after the summit to thank them, and condemned the "unbridled brutality" of some of the protesters, but she was forced to answer tough questions about hosting the summit in Hamburg during her closing news conference.