LIMA, Peru (AP) — After two days of meetings in Lima that rarely ventured beyond platitudes in discussing the strategies of the region’s major economies, the Asia-Pacific Economic Cooperation forum wrapped up on Saturday with a spirit of detente that many fear the summit may not see again for four years.

The 21 leaders from economies bordering the Pacific, including President Joe Biden and Chinese President Xi Jinping, had descended on Peru for the annual gathering at a time when America’s President-elect Donald Trump has vowed to withdraw the United States from its leadership of a global free trade agenda.

Few could help noting that Biden’s late entrance on Saturday for the traditional APEC family photo lent itself to political metaphor, as the rest of the leaders prepared to pose onstage before looking around to find Biden missing.

They tittered for five awkward minutes before a seemingly dazed Biden emerged and took his place in the far back corner, standing between Thailand’s 38-year-old Prime Minister Paetongtarn Shinawatra and Vietnam President Luong Cuong. Biden briefly reached for Shinawatra’s hand to steady himself.

Chinese President Xi scored the best spot in the house, front and center beside the host, Peruvian President Dina Boluarte.

Xi had draped himself in the banner of globalization this week, inaugurating a massive $1.3 billion megaport in Peru that promises to become South America’s biggest shipping hub and using his speeches to reject protectionism.

In Xi’s summit address, delivered by one of his ministers, the Chinese leader urged APEC members to “tear down the walls impeding the flow of trade,” and criticized tariffs — which Trump threatens to levy on Chinese imports — as “going back in history.”

For the annual photo-op, leaders all wore bark-hued wool scarves from Peru — in the APEC tradition of posing in some garb representative of the host country. While conference organizers typically position leaders in alphabetical order for the family photo, arrangements have varied over the years.

Reporters shouted questions as Biden left the stage Friday, asking how he felt about this being his last APEC summit — and one of his last major global events as president.

Biden had hoped that APEC — along with the Group of 20 summit in Rio de Janeiro, where he heads Sunday — would have capped his decades-long political career with a flurry of productive diplomacy and swaggering proclamations of America’s force on the world stage.

But with his party’s stinging defeat in the U.S. election and the future of the U.S.-China rivalry uncertain, there was little he could accomplish in Lima.

Biden sought to cement alliances that could be upended by a Trump administration. He expressed concern to the leaders of South Korea and Japan about what he called “dangerous and destabilizing cooperation” between North Korea and Russia.

After nearly four years of record stability in the Japan-U.S. alliance — a partnership crucial for regional security — Japanese Prime Minister Shigeru Ishiba is now struggling to arrange a high-stakes meeting with Trump.

He told reporters in Lima on Saturday that his hoped-for meeting with Trump on his way home from next week’s G-20 summit in Brazil would not happen — explaining that Trump’s team had invoked U.S. legal restrictions to refuse his requests.

“We are considering holding a meeting as soon as possible at a time that is most convenient for both sides,” Ishiba said.

For the first time in a year, Biden and Xi sat down later Saturday for their highly anticipated third and final meeting of Biden’s presidency.

Xi told Biden that his nation was was “ready to work with a new administration to maintain communication.”

Biden also struck a conciliatory tone, saying that such in-person talks helped “ensure that competition between our two countries will not veer into conflict.”