DANANG, Vietnam — President Trump has issued two starkly contradictory calls on his trip to Asia this past week: The nations of the world must rally behind the United States to confront the nuclear threat from North Korea, but they should expect America to go its own way on trade.

Reconciling those messages will be hard, and it may determine the near-term fate of the United States as a Pacific power.

In South Korea on Wednesday, Mr. Trump put on the mantle of a superpower leader. In a speech that crackled with the urgency of a Cold War manifesto, he told lawmakers there, “It is our responsibility and our duty to confront this danger together, because the longer we wait, the greater the danger grows, and the fewer the options become.”

Two days later, in the Vietnamese resort city of Danang, where American troops once came ashore to fight Communist insurgents, Mr. Trump reverted to the protectionist themes of his presidential campaign. “There is no place like home,” he told Pacific Rim leaders, warning them that the United States would never again sign a regionwide trade agreement.