WASHINGTON (AP) — When China rolls out the red carpet for Donald Trump, the grandeur of its welcome for the larger-than-life American president will mask a sobering reality.

President Xi Jinping, China's most powerful figure in a generation, is elevating his nation as a global power. Trump is unpopular and untrusted, pursued by political scandal and questions over his temperament as commander in chief of the world's most formidable military.

As they compete over shaping the future of the world's most populous and fastest-growing economic region, the stakes have never been higher.

On Wednesday, Trump begins what Chinese officials are billing as a "state visit plus" to Beijing, the highest-profile stop of his five-nation swing through Asia. He'll be seeking Chinese action to rebalance trade with the U.S. and to increase pressure on North Korea. Both presidents will then travel to Vietnam and the Philippines for regional summits, where they will bid for support among the continent's wavering leaders.

Trump is at a distinct disadvantage against Xi.

Xi two weeks ago consolidated his grip over China when he was endorsed for a second five-year term as communist party leader. His philosophy was enshrined in the constitution, arguably making him China's most powerful leader since Mao Zedong in the 1970s.

Trump congratulated Xi for his "extraordinary elevation" and compared the status of the Chinese president to that of a king — unusually fulsome American praise for an autocrat.

Although questions remain over Xi's stewardship of the Chinese economy — he faces rising debt and an inefficient state sector — he's won popular domestic support for a countercorruption drive in the ruling party and gained effective control over disputed areas of the South China Sea through a massive island-building campaign opposed by Washington.

"As Trump heads to China, he will find Xi at the pinnacle of his power with some significant home court advantages," said Mira Rapp-Hooper, a senior research scholar at Yale Law School.

Xi has big ambitions, too, having told the party congress it is now time for China to take center stage as a world power.

"There's clearly a confidence that extends from his newly secured position and permeates into the foreign policy realm," Rapp-Hooper said.

As for Trump, nine months into his presidency, he has alarmed strategists in Asia with his "America First" doctrine. He opposed the universally supported Paris agreement to combat climate change, adopted a protectionist stance on trade and raised doubts over his ability to manage a security crisis by vacillating between threats and conciliation toward North Korean leader Kim Jong Un.

The Republican Trump is also carrying a lot of domestic baggage.

While Xi is lauded like a demigod in China's fawning, state-run media, Trump is buffeted by a free press and criticism from both Democrats and Republicans. His approval ratings — around 38 percent, according to Gallup — suggest he's the most unpopular new U.S. president in the history of modern polling.

Reviled by political rivals, he has faced repeated and increasingly acrimonious run-ins with senior members of his own party who have been outraged by his freewheeling use of Twitter, off-the-cuff interview style and penchant for personally attacking those who cross him. Tennessee Sen. Bob Corker, a leading foreign policy voice, recently argued that Trump "debases our nation" with constant untruths and name-calling, accusing the president of setting the U.S. "on the path to World War III."

More immediately, perhaps, a legal net is closing on former Trump associates as the FBI investigates allegations of collusion between his campaign and Russia during the 2016 presidential election. A former campaign adviser pleaded guilty last week to lying to the FBI in a criminal case that pushed the investigation closer to the president.

Trump denies any collusion. And predictably, he maintains that he's in Asia "with great negotiating strength because of our tremendous economy." The latest U.S. jobs report showed unemployment at a 17-year low and the stock market at a record high.

Kurt Campbell, a former top U.S. diplomat for Asia and architect of President Barack Obama's strategic "pivot," said domestic woes will shadow Trump on his travels to the region, where the conventional wisdom is of U.S. retrenchment during "a period of dramatic Chinese advancement."

Nations are likely to "skate a little closer to Beijing," Campbell said.

However, Thitinan Pongsudhirak at Thailand's Chulalongkorn University said Trump has clawed back U.S. influence in Southeast Asia after Obama's human rights criticism pushed some American allies closer to Beijing. With authoritarian leaders in Thailand and the Philippines, in particular, Trump has repaired ties.

But the Trump administration hasn't helped itself elsewhere with its mixed policy signals, veering from America-centric economic nationalism to more traditional expressions of U.S. engagement in Asia. Recently, Washington outlined a strategy of building ties with democracies across the "Indo-Pacific."

The idea is similar to the Obama pivot that Beijing always viewed as a China containment policy. The Chinese would prefer the two countries accommodate each other's interests. It may view the close personal relationship between Trump and Xi as the best way toward that relationship.

"I don't think anyone would be able to contain China," Cui Tiankai, China's U.S. ambassador, told reporters in Washington last week.