See more of the story

– President Donald Trump vowed this week to reclaim the U.S. role as a Pacific power. But as he wrapped up a marathon tour of Asia on Tuesday, Trump’s mixed messages left allies unsure of the United States’ staying power and fed a growing sense that China, not the U.S., drives the agenda in the region.

Whether recruiting partners to confront North Korea even as he castigated them for trade abuses, or embracing China at the same time that he lined up a like-minded coalition to contain it, Trump was often a bewildering figure to countries that had already viewed him with anxiety.

“He’s seen as more personable than the figure on Twitter, but these internal contradictions have not been worked out,” said John Delury, an associate professor of Chinese studies at Yonsei University in South Korea. “Contrast that with the Chinese, who have this incredible consistency of message and are rising inexorably.”

In Manila, the final stop on his 12-day Asian tour, Trump declared his visit a success.

“This has been a very fruitful trip for us and, also, in all fairness, for a lot of other nations,” Trump said here on Monday, at a meeting with the leaders of Japan and Australia, during which he lectured them on the need for “fair and reciprocal” trade with the U.S.

“It was red carpet like nobody, I think, has probably ever received,” he added.

By some measures, he was right. Trump made no major gaffes. The closest he came was calling the North Korean leader Kim Jong Un “short and fat” in a tweet. He also faced criticism for failing to challenge Philippine President Rodrigo Duterte, who is accused of ordering thousands of extrajudicial killings.

But Trump’s energy did not flag and he was accorded a lavish reception at every stop, especially Beijing, where President Xi Jinping threw open the Forbidden City.

“Like any Trump endeavor, there were the inevitable distractions with tweets about the physical appearance of leaders and clear signals that he prefers the company of tyrants like Putin and Duterte,” said Kurt Campbell, a former assistant secretary of state for East Asian affairs.

Still, Campbell said, “If this trip were a high-wire act, President Trump managed to get to the other side.”

And yet there were subtler signs of tension, which spoke to the conflicting messages Trump brought to Asia and suggested a level of disarray in the White House’s policy toward the region.

Before his meeting with Prime Minister Shinzo Abe of Japan and Prime Minister Malcolm Turnbull of Australia, Trump had a brief contretemps with Turnbull over trade imbalances after he asserted that the U.S. ran deficits with “almost everybody.”

“Except us,” Turnbull interjected.

Trump made trade a major part of his message in Asia, and his tone grew more bluntly nationalistic as the trip wore on. After declaring in Beijing that he did not blame the Chinese for chronic imbalances with the U.S., he delivered a withering denunciation in Vietnam of regional trade pacts, like the Trans-Pacific Partnership, from which he has withdrawn the U.S.

The president delivered that message in a speech that was supposed to explain his concept of a “free and open Indo-Pacific” region. The idea, which Trump officials borrowed from the Japanese, is that the region’s four major maritime democracies — the United States, Japan, Australia and India — will constitute a bulwark against a rising China.

But this theme was largely lost in the jeremiad on trade. Critics said it testified to the stubborn divide within the administration between mainstream foreign policy figures like Matthew Pottinger, the senior director for Asia at the National Security Council, and economic nationalists like policy adviser Stephen Miller, who took a strong hand in writing the speech.

“The Indo-Pacific framing is clearly the handiwork of his more experienced and internationally minded senior national security team, while the ‘America First’ theme of demanding zero-sum concessions from all our trading partners is not,” said Michael Green, senior vice president for Asia at the Center for Strategic and International Studies.

Trump’s invitation for one-on-one trade talks with the United States, Green said, was likely to fall on deaf ears in Asian countries, many of which went through fierce debates before signing on to the Pacific trade deal and now want to reap its benefits.

“That’s like a sheriff squaring up for a showdown with the town outlaw by announcing to the posse that he wants a gunfight with each of them at the same time,” said Green, who served as President George W. Bush’s senior adviser on Asia policy.

Indeed, while Trump was preaching his go-it-alone economic message, the 11 countries still in the Trans-Pacific Partnership made significant progress toward finalizing the agreement without the U.S. They have given it an even wordier new name, the Comprehensive and Progressive Agreement for Trans-Pacific Partnership.

“I think this will be a strong message for not only Asia, but also other regions in the world,” Japan’s economy minister, Toshimitsu Motegi, told reporters.