In a final statement agreed by all 20 economies, 19 members including Russia, China and the European Union acknowledged Trump's decision to go his own way on taking the US out of the 2015 Paris climate accord.
But they also accommodated Washington's wish to "work closely with other countries to help them access and use fossil fuels more cleanly and efficiently".
While renewing a key anti-protectionist pledge, the communique for the first time underlined the right of countries to protect their markets with "legitimate trade defence instruments".
Carried on a wave of public fury over deindustrialisation in vast areas of the United States, Trump had promised to "Buy American" and "Hire American".
Also Read
But that stance had set him against many of America's allies, who warned Trump against an isolationist path.
Nevertheless, the wording of the final agreement marked the group of top economies' decision to finally close ranks despite bitter differences.
Just behind the tightly secured G20 summit venue, charred road barricades, trashed shops and stones, debris and shattered glass bore testimony to an anarchic night, when police commandoes with semi-automatic weapons detained militants who hurled rocks from rooftops.
Today, thousands of anti-riot cops were on standby and helicopters hovered overhead, as some 70,000 people were on the march again, according to organisers.
Within the summit walls, meetings have also been anything but harmonious.
All eyes were also on Trump's diplomatic waltz during the billionaire's first outing to the summit.
His most eagerly awaited encounter was a head-to-head with Russia's strongman President Vladimir Putin -- their first -- which lasted two and a quarter hours on Friday.
But Tillerson, who was present at the marathon meeting, also said the two alpha-male leaders "connected very quickly" with "very clear positive chemistry".
Trump said Saturday that the tete-a-tete was "tremendous".
Further driving a wedge between the UK and the European Union, Trump met Saturday with British Prime Minister Theresa May and said he was looking forward to a "very powerful" trade deal "very, very quickly".
Disclaimer: No Business Standard Journalist was involved in creation of this content