TOKYO - US President Donald Trump expects that Japan's military will reinforce US forces throughout Asia and elsewhere, he said on Tuesday, as the key US ally upgrades the ability of its forces to operate further from its shores.

Trump's comments followed his inspection of Japan's largest warship, the Kaga, a helicopter carrier designed to carry submarine-hunting helicopters to distant waters.

The vessel, which will soon be upgraded to handle F-35B short take-off and vertical landing (STOVL) jets, sailed to India on a flag-flying mission last year, going through the contested South China Sea, much of which is claimed by Beijing.

"With this extraordinary new equipment the Kaga will help our nations defend against a range of complex threats in the region and far beyond," Trump said in a speech on the ship's hangar deck.

The refit of the vessel, and its sister ship, the Izumo, is expected to bolster US forces operating from Japan by providing a refueling platform for US Marine F-35Bs.

Japanese Prime Minister Shinzo Abe, who accompanied Trump on the visit to the Kaga, has boosted defense spending since taking office in December 2012, stretching the pacifist constitution to ease limits on troop activities abroad.

He also wants to revise the post-World War Two charter to recognize the existence of Japan's military.

The Kaga and the Izumo are the biggest aircraft carriers Japan has operated since its wartime defeat, but its Self Defense Forces designate them as destroyers, as constitutional curbs forbid possession of weapons that could be used to attack other countries.

Trump is winding up a four-day state visit meant to underscore the US-Japan alliance, but shadowed by friction over Tokyo's big trade surplus with America.

On Monday he told a news conference that Washington supported Japan's efforts to improve its defense capability and touted Tokyo's purchases of American military equipment.

Japan last year unveiled a plan to buy 45 more F-35 stealth fighters, including some B variants, worth about $4 billion, adding to the 42 jets it has already ordered.

Japan says it eventually wants to field a force of around 150 of the advanced fighter jets, as it tries to keep ahead of China's advances in military technology.

"This purchase would give Japan the largest fleet of F-35s of any of our allies," Trump said on the Kaga, docked at the Yokosuka naval base near Tokyo.

The base is the headquarters of the Japanese fleet and also the home port of the US Seventh Fleet.