US election leaves questions for Apec
From Xi Jinping of China, to Shinzo Abe of Japan and Vladimir Putin of Russia, the list of international leaders who came to Peru for the Asia Pacific (APEC) Economic Leaders summit was heavyweight and underlined the economic clout of a regional trading block that accounts for 49% of global commerce.
Yet, for many delegates, the media and commentators on the fringe, the most interesting and talked about leader is still a "President in waiting", a man who wasn't even here in Lima.
The uncertainties resulting from the chance in the US presidency are plenty: "What will become of the Trans Pacific Partnership (TPP) now that Donald Trump has been elected?" "Will President-elect Trump commit the US to the same level of political and economic engagement with its allies in the region as before?" "Is Trump serious in his comments about slapping huge tariffs on Chinese goods entering the United States?"
Of these - and many other as yet unknowable policy changes - the one with the broadest initial impact could be the TPP.
The 12 nation trade agreement would have covered a collective population of 800 million people, accounting for 40% of world trade.
Among the many countries that could potentially "lose out" if the TPP does not come into force in its present form is New Zealand.
It's a country that does not have bilateral FTAs (Free Trade Agreements) with many other APEC members and would have benefited greatly, says its prime minister, John Key, from the lower tariffs and intellectual copyright provisions built into the agreement.
Having spent the best part of eight years working with other member nations to get the TPP finalised, Mr Key is clearly frustrated, to say the least.
The NZ prime minister still hopes that Donald Trump will drop or modify his objections to the TPP and that it can proceed with "a few cosmetic changes", but he knows that's a long shot.
"It could be renamed the Trump Pacific Partnership. That might do the trick," joked Mr Key, but he's in no mood to abandon the idea of greater regional free trade.
He concluded, "As leaders we will work with the incoming President [Trump]. We have a strong message that what we're doing works. We hope he's part of the programme but if he's not, we're going to carry on doing things."
Beijing, which has borne the brunt of Mr Trump's most aggressive and egregious attacks in recent months is, ironically, best placed to capitalise if the President Elect kills off the TPP, because China was not part of the deal anyway.
Premier Xi is not one to miss an opportunity and, sensing a temporary vacuum while Washington prevaricates, he's not standing around.
"China will not shut its door to the outside world but will open them more," Mr Xi said in his keynote address to the Lima summit.
Pledging to open China's markets even further and arguing that it should not be excluded from regional deals, simply because of its economic dominance, Premier Xi added, "Building a free trade area of the Asia-Pacific is a strategic initiative critical for long-term prosperity…. and it is regarded by the business community as the 'APEC dream".
As APEC leaders gathered for their traditional family photograph (thankfully with only a simple Peruvian shawl each for adornation over their business suits, rather than the full national dress they're often obliged to wear at these events.) Barack Obama cast a rather forlorn figure, barely raising a smile.
This has been a difficult week for the outgoing US leader, with many of his "legacy" achievements at home and abroad now under threat. The incoming president has vowed to unpick programmes from the TPP, to Obamacare to the Iran nuclear deal.
The 21 APEC leaders issued their final declaration from Lima, promising to advance quality growth and human development. Peru's President Pedro Pablo Kuczynski repeated the mantra that this could only be achieved through free trade and that protectionism was a danger that must be avoided.
Globalisation has not worked for everyone, far from it. Peru's economy has grown admirably in recent years but in the hills overlooking the capital there are plenty of reminders that rampant poverty still blights many countries in the region.
People trying to run small business feel particularly aggrieved. "What we need is more, not less protection", Nestor Alayo told me in his one-bedroom, corrugated steel shack, high on the hillside where he makes clothes with his wife and two sons.
"We're being hit by cheap imports from China", said Mr Alayo. Our raw material costs five times more than the stuff that comes from China."
In his last words on foreign soil as the President of the United States, Barack Obama said he still believed the US was a force for good in the world, prepared to go where others feared to tread to maintain a way of life that helped maintain "global order".
But as he exited stage right, tired, unsmiling and not looking back, Barack Obama was gone. His time on the international stage is almost up.
What comes next, nobody knows for sure.