Peppered with pomp and decorum, U.S. President Donald Trump’s four-day visit to Japan ended with a symbolic gesture highlighting the long-standing military ties between the U.S. and Japan, with Trump and Prime Minister Shinzo Abe jointly boarding the Japanese helicopter carrier Kaga to give an address to both the U.S. Navy and the Maritime Self-Defense Force.

According to Japan’s Defense Ministry, Trump is the first U.S. president to board an MSDF vessel. Tuesday’s boarding by the pair underlines Abe’s long-standing efforts to further strengthen the bilateral military alliance, and show it off to the world in hopes of keeping China and North Korea in check.

“At this very historic moment as Japan begins Reiwa, … we celebrate the U.S.-Japan alliance and the friendship between our freedom-loving peoples,” said Trump aboard the Kaga, currently stationed at Yokosuka Bay in Kanagawa Prefecture.

“This is the only port in the world where an American naval fleet and an allied naval fleet are headquartered side by side. The American and Japanese sailors stationed in this bay are living testaments to the enduring power of our incredible partnership,” he added.

The Kaga, an Izumo-class helicopter carrier, is one of two in the class operated as Japan’s largest warships, and they are planned to be remodeled into aircraft carriers. With the refurbishment, the vessel will be capable of carrying F-35B stealth fighter jets developed by U.S. firm Lockheed Martin.

The Izumo, the other Izumo-class warship, has recently been dispatched to the South China Sea and Indian Ocean to conduct joint military drills with the U.S. and other countries.

In a brief speech delivered while stood alongside Trump, Abe touched on Japan’s “Free and Open Indo-Pacific Strategy,” which stresses the rule of law and freedom of navigation.

The concept, first proposed by Abe in 2016, is widely seen as a counter-policy against China’s growing economic and military power in East Asia, although Tokyo has denied that officially.

“Our mission is to realize a free and open Indo-Pacific and to establish a foundation for regional peace and prosperity. As we gather here, I believe that every one of us shares an unwavering determination to fulfill such a mission,” Abe said in the speech.

“The Japan-U.S. alliance has become more robust than ever under the great partnership that President Trump and I have developed. The fact that we stand together on board the JS Kaga today is a testament to such a robust alliance,” said Abe, adding that the address marked the first time that the two leaders of Japan and the U.S. held a joint address for their fleets.

Retired Vice Adm. Toshiyuki Ito, a professor at Kanazawa Institute of Technology’s Toranomon Graduate School, said Trump’s visit to the Kaga not only sent a strong message to the world regarding the strength of Japan-U.S. military ties, but also represented a marked change in Trump’s understanding of the alliance.

“The linchpin of the Japan-U.S. alliance is what would be called its ‘navy-to-navy’ policy. Namely, the partnership between Japan’s MSDF and the U.S. Navy’s 7th Fleet is at the very core,” of the two countries’ military alliance, he explained.

During the 2016 presidential election campaign, Trump often criticized Japan for what he described as free-riding on the military alliance to defend itself in the case of war.

However, the joint defense operation guidelines revised in 2015 stipulate that “Japan will have primary responsibility” to repel an armed attack against the country and that the U.S. would only provide “support” to Japan.

This means the only time the U.S. would be dispatched to serve alongside the SDF to defend Japan would be when the SDF is mobilized, and Ito said that Trump might have finally understood how the military alliance would work to defend Japan.

“I think this visit to the Kaga is emblematic of that change in his thinking,” Ito said.

The joint address to the military personnel aboard the Kaga also sends a strong message that the U.S.-Japan alliance is firm, Ito added.

“Military ships are completely different from normal ships” in that they represent the country’s intent and send clear international messages, Ito explained.

“A maritime force is also a tool for diplomacy,” he added, and Trump boarding the Kaga also communicates the depth of the Japan-U.S. relationship both internally and abroad.

In December, the Japanese government announced its plan to purchase 105 F-35A fighter jets from the U.S. for the Air-Self-Defense Force, a development that both leaders noted during Trump’s visit, as well as during the address aboard the Kaga. Japan also plans to purchase 42 F-35B jet fighters to be deployed on the two Izumo-class aircraft carriers.