WASHINGTON — President Trump, fresh off patching up ties with China, reassured Japan’s leader Friday that the U.S. will defend its close ally. Together, the pronouncements illustrated a shift toward a more mainstream Trump stance on U.S. policy toward Asia.

Welcoming Prime Minister Shinzo Abe to the White House with a hug, Trump said he wants to bring the post-World War II alliance with Japan “even closer.” While such calls are ritual after these types of meetings, from Trump they’re sure to calm anxieties that he has stoked by demanding that America’s partners pay more for their own defense.

Abe, a nationalist adept at forging relationships with self-styled strongmen overseas, was the only world leader to meet Trump before his inauguration. He is now the second to do so since Trump took office.

Flattering the billionaire businessman, Abe said he would welcome the United States becoming “even greater.” He also invited Trump to visit Japan this year. Trump accepted, according to a joint statement.

Other leaders of America’s closest neighbors and allies, such as Mexico, Britain and Australia, have been singed by their encounters or conversations with Trump.

But the optics Friday were positive. After a working lunch on economic issues, the two leaders boarded Air Force One with their wives for a trip to Trump’s Mar-a-Lago Club in Florida. Trump and Abe are scheduled to play golf Saturday.

Their Oval Office meeting came hours after Trump reaffirmed Washington’s long-standing “one China” policy in a call with Chinese President Xi Jinping. That statement will similarly ease anxieties in East Asia after Beijing was angered and other capitals were rattled by earlier suggestions that he might use Taiwan as leverage in trade, security and other negotiations.

Although Japan is a historic rival of China, Trump said that his long and “warm” conversation with Xi was good for Tokyo, too.

“I believe that will all work out very well for everybody, China, Japan, the United States and everybody in the region,” Trump said at a joint news conference with Abe.

Stepping carefully into Japan’s longstanding territorial dispute with China over uninhabited islands in the East China Sea, Trump said the U.S. is committed to the security of Japan and all areas under its administrative control. The implication was that the U.S.-Japan defense treaty covers the disputed islands, which Japan calls the Senkaku, but China calls the Diaoyu. Beijing opposes such statements, but Trump’s wording allowed for some diplomatic wiggle room.

Abe has championed a more active role for Japan’s military. He has eased constraints imposed by the nation’s pacifist postwar constitution and allowed forces to defend allies, even if Japan itself is not under attack.