The visit was more ceremony than substance. Home to more than 50,000 U.S. troops, Japan is one of American's closest allies. During his four day visit, President Trump discussed thorny issues with Prime Minister Shinzo Abe, including North Korea, and he tried to sell Japan on buying more American-made products.

Before leaving Japan, Mr. Trump spoke to about 1,000 sailors on the USS Wasp, part of the massive U.S. seventh fleet that patrols the Pacific and would be on the frontlines of any conflict with North Korea.

"As president, I have no higher honor than serving as your commander in chief," Mr. Trump said. "You defend your homeland and our allies against missile attacks with our most advanced radar and weapon systems in the world."

President Trump, center, first lady Melania Trump and Japan's Prime Minister Shinzo Abe wave after delivering a speech to Japanese and U.S. troops as they aboard Japan Maritime Self-Defense Force's (JMSDF) helicopter carrier DDH-184 Kaga at JMSDF Yokosuka, south of Tokyo, Tuesday, May 28, 2019. AP

The president also visited a Japanese warship being retrofitted to carry American-made fighter jets, military hardware he has pressured Japan to buy.

"Japan recently announced its intent to purchase 105 brand new stealth F35 aircraft — the best in the world," the president said.

During their weekend summit, President Trump and Japanese Prime Minister Abe did not reach an overall trade agreement. And at a news conference Sunday, they openly disagreed about North Korea's recent short range missile launches, which are a threat to Japan and U.S. service members stationed here.

"It doesn't matter," Mr. Trump said. "All I know is that there have been no nuclear tests, there have been no ballistics missiles going out."

With a highly choreographed state visit that put President Trump front and center, Prime Minister Abe still seemed to get what he wanted: affirmation of the two countries' bond.

"The U.S.-Japan alliance has never been stronger," Mr. Trump said.