The leaders of the US and China laid out sharply divergent visions for the future of global trade on Friday, with Donald Trump doubling down on his "America First" rhetoric, leaving counterpart Xi Jinping to defend the "irreversible" tide of globalisation.
Mr Xi, who has emerged as the most powerful Chinese leader in decades, and Mr Trump, whose woes include dismal approval ratings at home, spoke moments apart at the Apec summit in the Vietnamese city of Danang.
Mr Trump in turns lavished praise on Asia-Pacific nations and accused them of undercutting the world's largest economy, saying US interests had been ill-served by the architecture of global trade.
He vowed his country will "no longer tolerate" unfair trade, closed markets and intellectual property theft.
"We are not going to let the United States be taken advantage of any more," he added, taking a swipe at the World Trade Organisation for failing to police free-trade infringements.
"I am always going to put America first the same way I expect all of you in this room to put your countries first."
In response, Mr Xi swiftly moved to occupy the space vacated by Trump, positioning China as the champion of a world with fewer barriers to commerce.
He defended globalisation, which has seen his country pull itself from poverty to become a superpower in three decades, calling it an "irreversible historical trend".
But as gripes over trade imbalances, job losses and social inequality abound, he conceded that free trade philosophy needed to be repurposed to be "more open, more balanced, more equitable".
Ahead of his speech, China announced it would further open the country's financial markets to foreign firms, a key demand from the US and other global investors who have long complained about strict limits on access to the world's second-largest economy.
Mr Trump arrived in Vietnam from Beijing, where he sought to build a consensus against North Korea's nuclear ambitions.
In China he was gushing in his praise of Mr Xi, calling his host "a very special man" in a trip rich with photo opportunities but lacking concrete outcomes on tackling key issues such as North Korea.
Apec brings together the big hitters of business and politics, including Japan's Shinzo Abe and Russia's Vladimir Putin.
Russia and the US gave mixed messages about whether their leaders would meet in Danang, with the White House ruling out an encounter but the Kremlin saying it could still happen.
A face-to-face would be a box office event, with Russia accused of interfering in the US election last year that brought the billionaire one-time reality TV star to power.
The rise of Mr Trump as leader of the world's biggest economy risks unravelling decades of US-led economic diplomacy that webbed global economies together with free-trade and low-tariff pacts.
He has pledged to wring a better deal from countries the US has large trade deficits with - including China - and bring jobs back to the hollowed out American industrial heartland that voted for him.
But proponents of free trade, including many allies, have looked on aghast as the president tears up the rule book and anti-globalisation arguments ricochet through the US and Europe.
Mr Trump has already pulled Washington's support from the sprawling 12-nation Trans Pacific Partnership (TPP) trade pact and vowed to renegotiate Nafta, a trade deal between the US, Canada and Mexico.
On Friday, Asia-Pacific ministers were struggling to salvage the TPP deal, with Canada denying reports that an agreement had been struck among the remaining 11 members to press ahead without the US.
Malaysian premier Najib Razak, whose country is among the so-called TPP-11 nations, lamented the change of tone.
"I see the rise of anti-globalisation, I see the rise of more inward looking [nations] ... there's a lot of soul-searching we have to do during this APEC," he told a room packed with business leaders on the sidelines of the forum.
The annual Apec summit is one of the largest gatherings on the diplomatic calendar, bringing together scores of world leaders and more than 2,000 chief executives.
Apec represents 21 Pacific Rim economies, the equivalent of 60 per cent of global GDP and covering nearly three billion people, and has pushed for freer trade since its inception in 1989.