President Obama boards Air Force One at Tegel Airport in Berlin on Friday en route to the annual Asia Pacific Economic Cooperation forum, being held this year in Lima, Peru. (Ralf Hirschberger/dpa via AP)

President Obama sought to reassure leaders here at an annual summit that the United States would continue to pursue closer ties with the Asia-Pacific region, even though Donald Trump’s presidency is sure to reshape America’s approach to the region.

Several months ago, administration officials envisioned the ­Asia-Pacific Economic Cooperation meeting as a possible capstone to years of painstaking efforts to deepen trade, defense and diplomatic ties between the United States and East and Southeast Asia, the world’s most populous and fastest-growing region.

But Trump’s sharp criticism of trade deals such as the 12-nation Trans-Pacific Partnership (TPP), which still lacks congressional ratification, and his suggestion that long-standing U.S. military base agreements in Japan and South Korea might be too expensive to maintain, threatens to reverse the Obama administration’s agenda and upend decades of American leadership in the region.

“The governments in Asia are all very anxious,” said Michael Green, senior vice president for Asia at the Center for International and Strategic Studies and former senior Asia director at the National Security Council under President George W. Bush.

In a bilateral meeting with Obama on Saturday evening, Chinese President Xi Jinping voiced that anxiety as he sat across from the president at a long table, with both men flanked by several aides.

“We meet at a hinge moment in the China-U.S. relationship,” Xi said, through an interpreter, after Obama had thanked him for China’s cooperation on issues as divergent as climate change and nuclear nonproliferation. “I hope the two sides will work together to focus on cooperation, manage our differences, and make sure there is a smooth transition in the relationship, and that it will continue to grow.”

Although most of the president’s diplomacy here took place behind closed doors, he tackled those concerns directly Saturday as he spoke to an audience of 1,000 young people who had gathered in Peru to celebrate the administration’s new Young Leaders of the Americas Initiative. After a young woman asked whether concerns about Trump’s presidency were “for real,” Obama said he had the same message for her that he had been delivering to world leaders in Greece, Germany and Peru during his last foreign trip as president.

“My main message to you, though, is: Don’t just assume the worst,” he said, standing in shirt sleeves on a wide stage erected at the center of the Pontifical Catholic University’s gym. “Wait until the administration’s in place, it’s actually putting its policies together, and then you can make your judgments.”

But the president acknowledged that while the next administration may maintain several of his policies regarding Latin America, for example, “There are going to be tensions, most likely around trade more than anything else.”

The uncertainty and anxiety over Trump’s administration in Tokyo, Seoul and beyond come at a time of rising challenges and complexities. China has accelerated its expansionist aims with maritime claims throughout the South China Sea, angering its neighbors, and has touted its own multilateral trade deal in Asia that does not include the United States. North Korea’s belligerent leader Kim Jong Un has defied international rules and condemnation by exploding nuclear devices and conducting ballistic-missile tests. The presidency of South Korean President Park Geun-hye is threatened by a massive corruption scandal. And new Philippines President Rodrigo Duterte’s fiercely anti-U.S. rhetoric has alarmed Washington about whether the longtime U.S. ally could draw closer to Beijing.

[Overseas, Obama warns against a ‘crude nationalism’ taking root worldwide]

During the U.S. presidential campaign, the New York businessman said Japan and South Korea are not paying “their fair share” to support the U.S. troop presence there. And Trump repeatedly criticized China as a currency manipulator and powerful global operator that had taken advantage of the United States under Obama’s tenure. He has threatened to slap high tariffs on imports from China and to withdraw the United States from a global climate agreement the Obama administration helped broker by courting cooperation with Chinese and Indian officials.

Trump has already begun to reach out to Asian leaders since his election, meeting with Japanese Prime Minister Shinzo Abe in New York and talking by phone with the South Korean president. After meeting with Trump on Thursday, Abe said that the two had a “very candid discussion” and that he is “convinced that Mr. Trump is a leader in whom I can have confidence.”

Trump’s team has taken a sharply critical view of the Obama administration’s effort to “rebalance” or “pivot” U.S. foreign policy attention to Asia. In an article published Nov. 7 in Foreign Policy, two of Trump’s policy advisers, Alexander Gray and Peter Navarro, criticized both Obama and former secretary of state Hillary Clinton as failing to exercise enough military muscle in Asia.

“This pivot has also turned out to be an imprudent case of talking loudly but carrying a small stick, one that has led to more, not less, aggression and instability in the region,” they wrote. “American allies and partners in the region have been disheartened by a foreign policy that has veered from feckless to mendacious.”

[TPP is the first casualty of Trump’s anti-trade campaign pledge]

Some Asia analysts suggest that while a vow to increase military spending in the region would be welcomed by leaders there, a de-emphasis on trade deals and a more realpolitik approach to diplomatic relations could prompt some Asia-Pacific nations to move closer toward China.

In a memo for the Eurasia Group, a global risk assessment firm in New York, Obama’s former senior Asia director, Evan Medeiros, predicted that “US alliances will experience strain but will not break, while Asian leaders gradually hedge away from the US on both security and economic issues.”

Some of the statements by Trump and his advisers, Medeiros wrote, “raise fundamental questions about America’s commitment to basic interests and policies that have guided U.S. engagement over the past 60 years.”

The president and his aides, for their part, sought to emphasize that officials should not jump to conclusions about where American diplomacy is headed.

One White House official, who spoke on the condition of anonymity in order to talk about the ­president-elect, said that it was worth noting that Trump has not questioned the importance of the Asia-Pacific region even as he has suggested that he would pursue a different path.

“I haven’t seen Trump walk that back,” the official said.

In a sign of how intent Obama remains on shoring up some of those relationships before leaving office, he will meet with Australian Prime Minister Malcolm Turnbull here Sunday.

Green said he advised some of the current NSC officials that Obama would be on solid ground telling other foreign leaders “this was not an isolationist election,” since independent polls show that Americans continue to back the regional trade deal as well as military support for key Asian allies.

But U.S. Trade Representative Michael Froman, who is attending the summit here, told reporters Friday that other nations’ political and economic calculus may change if the next administration delays ratification of TPP and sends different diplomatic signals. China is continuing to push for a competing trade agreement, the Regional Comprehensive Economic Partnership (RCEP), which involves the 10 members of the Association of Southeast Asian Nations and six other countries that have free trade agreements with that association.

“Inaction poses serious costs,” Froman said, noting these other negotiators met a few weeks ago and have another round of talks scheduled next month. “That is happening, as we say, in real time, where we see people around the table here right now talking about that if TPP doesn’t move forward, then they’re going to have to put their eggs in an RCEP basket.”

David Nakamura contributed to this report.