G20 countries have managed to avoid a total bust-up with Donald Trump over climate change, leaving the door open for Washington to return to the Paris Agreement -- but at the cost of risky concessions.
After the US president decided last month to pull out of the hard-fought deal to combat global warming, climate change was always going to be centre-stage at this week's gathering of the G20 -- major economies that are together responsible for the vast majority of harmful emissions.
Ultimately, the final joint statement after the summit in Hamburg underlined that the 2015 Paris deal is "irreversible", while "taking note" of Washington's decision to quit the agreement.
The key risk for defenders of the global pact is that other countries could now follow Trump's lead.
The ink was barely dry on the G20 statement before Turkey's President Recep Tayyip Erdogan threatened not to ratify the deal without financial concessions.
"After that step taken by America, the position that we adopt is in the direction of not passing it in parliament," Erdogan said.
The rest of the G20 made an exceptional concession to the US by letting through a passage in their joint declaration specifically referring to Washington's position.
It confirms that the US is committed to lowering its emissions, so long as this is compatible with economic growth.
Andrew Light of the World Resources Institute said this was the most interesting line in the text, indicating it stood in "stark contrast" with Trump's arguments about pulling out in which he claimed that "fulfilling our commitments to Paris would hurt our economy".
Celine Bak of Canada's Centre for International Governance Innovation hailed the wording as "a clear victory for the G20, which knew how to formulate a statement that could allow President Trump to re-integrate into the Paris accord."
She is not alone in hoping Washington could be brought back into the fold.
French President Emmanuel Macron said he "never gives up hope on convincing" Trump to change his mind on the Paris deal, while British Prime Minister Theresa May also said she believed such a return was possible.
"It's good to be optimistic, but there comes a point where that turns into naivety," said Francois Julliard of Greenpeace France.
"Yes, the United States could come back to the Paris accord, but right now, in concrete terms, they're disengaging."
German Chancellor Angela Merkel, for her part, said she "did not share the optimism" of those hoping for a change of heart.