President Donald Trump welcomes Japanese Prime Minister Shinzo Abe outside the West Wing of the White House in Washington, Friday, Feb. 10, 2017. (AP Photo/Andrew Harnik)

WASHINGTON (AP) — President Donald 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 the Republican 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 which calls the Senkaku, but China calls the Diaoyu.

Beijing opposes such statements, but Trump’s wording allowed for some diplomatic wiggle room. The joint statement released later was more explicit, however, in spelling out the U.S. commitment.

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

As a candidate, Trump urged even greater self-reliance, at one point even raising the notion of Japan and South Korea developing their own nuclear weapons as a deterrent to North Korea.

He made no similar remark Friday, instead thanking Japan for hosting nearly 50,000 American troops, which also serve as a counterweight to China’s increased regional influence. He said freedom of navigation and dealing with North Korea’s missile and nuclear threats are a “very high priority.”

There was less agreement on economics.

One of Trump’s first actions as president was to withdraw the U.S. from a 12-nation, trans-Pacific trade agreement that was negotiated by the Obama administration and strongly supported by Tokyo.

Diverting from Trump’s stance that the Trans-Pacific Partnership is bad for America, Abe stressed the importance of a “free and fair common set of rules” for trade among the worlds’ most dynamic economies.

“That was the purpose of TPP. That importance has not changed,” Abe said through an interpreter, though both leaders held out the possibility of a future bilateral, U.S.-Japanese deal.

Trump has also criticized Toyota Motor Corp. for planning to build an assembly plant in Mexico and has complained Japanese don’t buy enough U.S.-made cars.

But Abe told U.S. business leaders Friday that “a whopping majority” of the Japanese cars running on American roads are manufactured in the U.S. by American workers. That includes 70 percent of Toyotas. Abe said Japanese business supports some 840,000 jobs in the United States.

That may not be enough for Trump, who is highly sensitive to U.S. trade deficits.

Japan logged the second-largest surplus with the U.S. last year, behind only China, and there had been some expectation Abe would use the visit to propose new Japanese investments to help Trump spur American job growth. There was no such announcement Friday.