BEIJING – When Chinese leader Xi Jinping said last month that "no country can afford to retreat into self-isolation," he might as well have been talking about Donald Trump as the U.S. president makes his first official visit to Southeast Asia.
As Trump steers his administration's focus inward, China has stepped into what many see as a U.S.-sized void left behind in the region, boosting cooperation on infrastructure, security and trade, flooding eager countries with tourists and offering itself up as a model for developing nations with sometimes dodgy rights records.
China's rise in influence, and the perceived decline of the United States by some in the region, is all the more extraordinary because Beijing has often been seen as an arrogant bully in Southeast Asia, where it is mired in disputes over competing claims in the South China Sea.
Throughout the region, countries have looked at Xi and Trump and found more stability and reassurance from the Chinese president, said Richard Heydarian, a Manila-based Asia specialist and author.
"America is clearly on a downward trajectory in terms of its influence in the region," Heydarian said. "Donald Trump comes in and he sounds even more protectionist than China. So you have a strange, in fact surreal, situation whereby China is now presenting itself as the guardian of the global economic order."
A look at how new approaches from Trump and Xi have countries in Southeast Asia attempting a sometimes awkward balancing act:
TRUMP: "RADICALLY DIFFERENT"
Perhaps Trump was always destined to come up short in any Asia comparison with his predecessor, Barack Obama, whose childhood was partly spent in Indonesia and Hawaii.
Obama, who hosted Southeast Asian leaders last year in the United States, made much of a supposed "pivot" of U.S. attention back to Asia after what his administration portrayed as years of neglect.
The biggest signal that Trump appeared willing to cede ground to China came shortly after his January inauguration, when he withdrew from the Trans-Pacific Partnership trade deal, saying he preferred one-on-one pacts that brought more benefits to the United States.
Obama had presented the deal among Pacific Rim countries, including Malaysia, Vietnam, Brunei and Singapore, as symbolic of U.S. commitment to the region — and a crucial curb of Chinese power.
As the remaining TPP countries discuss ways to do the deal without Washington, critics say Trump's protectionism will allow China to establish greater inroads.
During a recent trip to Washington, Singaporean Prime Minister Lee Hsien Loong nicely summarized the dilemma many in the region face because of a "radically different approach" under Trump.
The Chinese, Lee said, will pursue their objectives "assiduously, quietly farming away, and they will make friends and influence people whether or not you (the United States) are there, and if you are not there, then everybody else in the world will look around and say, 'I want to be friends with both the U.S. and the Chinese, and the Chinese are ready and I will start with them.'"
Trump is set to attend the Asia-Pacific Economic Cooperation summit in Vietnam, where he may offer up a broader Asia policy, and meetings of the Association of Southeast Asian Nations in the Philippines.
A scheduled meeting with Philippine President Rodrigo Duterte could be a good signal on how Trump may be received in the region.
Duterte, who rejected Trump's White House invitation earlier this year, recently told reporters in the Philippines, a U.S. treaty ally, that he would welcome Trump as "the important leader on this side of the planet."
XI: STANDING "TALL AND FIRM"
During his speech last month at the twice-a-decade Communist Party congress, Xi, who has cemented his status as China's most powerful leader since Mao Zedong, declared that his nation "now stands tall and firm in the East."
China's judgment that the U.S. is in decline, which can be traced to the onset of the global financial crisis in 2009, "is even more certain today, as it sees U.S. global leadership eroding under President Donald Trump," Bonnie Glaser and Matthew Funaiole, China experts at the Center for Strategic and International Studies think tank in Washington, wrote recently.
Part of the explanation for China's rise in Southeast Asia is Beijing's decision last year to "proactively moderate" its positions on the South China Sea, which it claims nearly in its entirety, said Shi Yinhong, an international relations expert at Renmin University of China.
Beijing has also made progress because of what its critics call a willingness to support countries in the region accused of systematic human rights abuse or corruption.
China's huge shipments of aid and investment to Cambodia help to enable long-serving Prime Minister Hun Sen's authoritarianism and repression of the press and political opposition.
Thailand's military rulers, who ousted an elected government in a 2014 coup, have cultivated ties with Beijing as a counterbalance to a disapproving West.
Xi's biggest move in the region, the "One Belt, One Road" initiative, seeks to link China to Southeast Asia, Central Asia, Africa, Europe and beyond with a sprawling network of roads, railways, ports and other economic projects.
There have been worries about political and economic interference as Beijing pitches one part of that effort — a high-speed rail system — to Southeast Asian nations.
But negotiations in Indonesia and Thailand "notably suggest that rather than acting as a bully and imposing its conditions on host countries, China has actually shown a great degree of flexibility and compromise," according to research and interviews conducted by China experts Agatha Kratz and Dragan Pavlicevic.
As Chinese money, influence and political pressure flood the region, many countries struggle with how far into Beijing's sphere, and away from Washington, it's wise to go. Complicating the debate is strong anti-Chinese sentiment in certain areas.
As a result, some countries have reserved judgment on Trump, raising the stakes for his Southeast Asia trip.
"They hope the Trump administration will be committed more to their region, but they do not want to take a stand or harm their relations with China," Shi said.
Associated Press writers Stephen Wright in Jakarta, Indonesia and Gillian Wong in Beijing contributed to this report.