After hours of tense negotiation, world leaders of the G20 have signed off on a summit-ending agreement reaffirming a commitment to multilateral trade and a "rules-based international order" – but the real winner may yet be Donald Trump.
There is no doubt of the impact the US president has on the world stage, with the final communique from the two-day meeting in Buenos Aires having to tip-toe around American demands. The message involved a pledge to reform the World Trade Organisation (WTO), with Mr Trump having built his campaign for the presidency on the idea that America was being treated unfairly on trade issues.
The statement – which involved negotiations that lasted through the night – did not mention the word “protectionism” after negotiators said that had met resistance from the United States. The EU, and its individual members, had been looking to put pressure on Mr Trump over the issue, given his 'America First' doctrine, but officials said they had felt resistance from Washington on almost every issue.
Mr Trump and his team were also the lone holdouts on language in the statement over global warming. The joint statement signed by all 20 member nations said 19 of them reaffirmed their commitment to the Paris climate accord, with the US having previously announced its withdrawal from the pact.
Apparently Saudi Arabia, Russia and Turkey all wavered on the issue of climate change before siding with the majority. Hardliners in Mr Trump's administration, such as national security advisor John Bolton, will take heart from the fact that there could be some movement on such issues.
On global commerce, the statement says the 20 countries support multilateral trade but acknowledge that the current system does not work and needs fixing, via “the necessary reform of the WTO to improve its functioning”.
On migration, there is minimal language that acknowledges growing migrant flows and the importance of shared efforts to support refugees and solve the problems that drive them to flee their home countries. Officials had been told that any more would be an apparent deal-breaker for Washington.
Again, the US has cracked down on migration in recent weeks, with tear gas being used recently as some of the thousands of asylum seekers that have travelled to the US tried to rush the border with Mexico. Many of those who have travelled thousands of miles to reach the border city of Tijuana are fleeing violence in Central American nations such as Honduras and El Salvador.
French president Emmanuel Macron, who has frequently clashed with Mr Trump over the need for global cooperation, called it a victory that the US signed on to the statement at all, given the tensions going into the talks. “With Trump, we reached an agreement,” Mr Macron said. “The US accepted a text.”
Other countries also had gripes with the text. South Africa objected to language on trade and Australia did not want the statement to be too soft on migration.
However, the other big holdout was China, who pushed back hard in talks over steel. Indeed, a dinner between China's president Xi Jinping and his US counterpart on Saturday night had become the centrepiece of Mr Trump's visit, especially since pulling out of a meeting with Russian president Vladimir Putin and cancelling a Saturday afternoon press conference out of respect for the family of George HW Bush, who died late on Friday night.
The issuing of the G20 communique will have given Mr Trump a lift ahead of the dinner, with the world watching anxiously to see how the two nations try to solve an escalating trade war that started over the imposition of steel and aluminium tariffs but has expanded to include billions of dollars of goods.
Mr Trump struck a positive note as he sat across from Mr Xi at a meeting before dinner, despite earlier threats to impose new tariffs on Chinese imports.
“We'll be discussing trade and I think at some point we are going to end up doing something great for China and great for the United States,” Mr Trump said.
He suggested that the “incredible relationship” he and Mr Xi had established would be the primary reason they could make progress on trade, though he offered no specifics on how they might resolve the main issue dividing their countries.
Mr Xi told Mr Trump that only through cooperation could the US and China serve the interest of peace and prosperity. The world's two biggest economies have also increasingly been at odds over security in the Asia-Pacific region.
Amid the myriad of other issues present at the summit, from the fallout regarding a naval clash between Russia and Ukraine to the investigation into the murder of Saudi journalist Jamal Khashoggi, many officials made clear that movement on trade was important.
International Monetary Fund managing director Christine Lagarde said high levels of debt accumulated by emerging market nations was a pressing concern.
“There is an urgent need to de-escalate trade tensions, reverse recent tariff increases, and modernise the rules-based multilateral trade system,” she said.
Reuters contributed to this report