World leaders made concessions on trade and climate language to Donald Trump on Saturday at the end of the most fractious and riot-hit G20 summit ever, in exchange for preserving a fragile unity of the club of major industrialised and emerging economies.
In a departure from final summit declarations that tend to outline consensus on issues that range from fighting terrorism to financial governance, the extraordinary conclusions this year spelled out differences on core issues.
It acknowledged Trump's decision to go his own way on taking the United States out of the 2015 Paris climate accord and clearly stated Washington's wish to continue using and selling fossil fuels that are a main driver of global warming.
The declaration also stated for the first time the right of countries to protect their markets with "legitimate trade defence instruments" -- wording that essentially gives Trump wiggle room to push on with his "America First" policy.
Trump, carried to the White House on a wave of public fury over deindustrialisation in vast areas of the United States, had launched "Buy American" and "Hire American" campaigns.
The nationalistic stance has set him on collision course with many of America's allies, who warned Trump against an isolationist path and starting a round of trade war.
"Where there is no consensus, the communique spelt out the discord," said host Chancellor Angela Merkel, who was praised by Russian President Vladimir Putin for finding an "optimal compromise" on the touchiest issue of climate.
French President Emmanuel Macron also hailed the approach, saying that the club found an "indispensable balance" through the text and halted any backsliding on fighting climate change, which is blamed for melting ice caps, rising seas and severe weather events.
The French leader, at his first G20 gathering, also took the opportunity to announce a new climate summit for December 12, which he said would focus on climate financing.
Trail of destruction  
If the meetings within the tightly secured G20 summit venue were anything but harmonious, outside, chaos and violence gripped Germany's second city.
Ten minutes' walk from the summit venue, charred road barricades, trashed shops, debris and shattered glass bore testimony to an anarchic Friday night of street clashes between protesters and police, when commandoes chased militants who hurled rocks from rooftops.
The clashes had blocked US First Lady Melania Trump at her residence on Friday, forcing her to miss a tour of Hamburg harbour, and for G20 organisers to completely alter a programme for spouses of visiting leaders.
On Saturday, thousands of anti-riot cops were again on guard, as helicopters hovered overhead, with at least 20,000 demonstrators on the march again.
Trump vs Putin  
Within the summit walls, world leaders were dancing a delicate diplomatic waltz, with discord not only dogging the main G20 conferences, but also adding tension to the atmosphere in bilateral asides.
Host Merkel herself admitted that "deep differences" remain with Turkish President Recep Tayyip Erdogan after they met on the sidelines of the summit. 
But it was Trump's first head-to-head with Russia's leader President Vladimir Putin that stole the show.
A day after Trump slammed Moscow's actions in Ukraine and Syria, the two men had a "robust and lengthy exchange" about allegations of Russian meddling in the 2016 US election, Secretary of State Rex Tillerson said.
But Tillerson, who was present at the meeting that ran two hours and 15 minutes, also said the two alpha-male leaders "connected very quickly" with "very clear positive chemistry".
Trump said on Saturday that the tete-a-tete was "tremendous" while Putin gave an upbeat assessment of ties ahead with the US leader. 
"There is every reason to believe that we will be able to at least partially re-establish the level of cooperation that we need," Putin said.
While scoring at his Russian encounter, Trump still faced another thorny meeting later on Saturday, when he was due to hold talks with Chinese President Xi Jinping.
North Korea's first intercontinental ballistic missile test this week was expected to top the discussions, with Trump warning on Thursday that Pyongyang's military sabre-rattling would bear "consequences".
Trump had also said he is considering a "severe" response to Pyongyang's "very, very bad behaviour".
Ahead of the talks with Xi, Tillerson said the US would continue to press China to do more to rein in North Korea.
"Our engagement is unchanged with China and our expectations are unchanged," Tillerson said. "We have not given up hope."
Related Story