WASHINGTON (BLOOMBERG, REUTERS) - President Donald Trump has recently mused to confidants about withdrawing from a longstanding defence treaty with Japan that he thinks treats the US unfairly, according to three people familiar with the matter.

Mr Trump regards the accord as too one-sided because it promises US aid if Japan is ever attacked but doesn't oblige Japan's military to come to America's defence, the people said.

The treaty, signed more than 60 years ago, forms the foundation of the alliance between the countries that emerged from World War Two.

Even so, the President hasn't taken any steps towards pulling out of the treaty, and administration officials said such a move is highly unlikely. All of the people asked not to be identified discussing Mr Trump's private conversations.

However, Japan’s top government spokesman said on Tuesday (June 25) that the United States has confirmed its defence treaty with Japan.

“The thing reported in the media you mentioned does not exist,” Mr Yoshihide Suga told reporters in Tokyo.

“We have received confirmation from the US President it is incompatible with US government policy,” he added.

Exiting the pact would jeopardise a postwar alliance that has helped guarantee security in the Asia-Pacific, laying the foundation for the region's economic rise.

It would also risk spurring a fresh nuclear arms race as Japan would need to find another way to defend itself against threats from China and North Korea.

Under the terms of its surrender in World War Two, Japan agreed to a pacifist Constitution in which it renounced the right to wage war.

MEETING WITH ABE

The President will make his second trip to Japan in a matter of weeks on Wednesday (June 26) when he travels for the Group of 20 summit in Osaka.

He's expected to again meet with Japanese Prime Minister Shinzo Abe, who enjoys as good a relationship with the mercurial and unpredictable American president as any foreign leader.

Related Story Trump expects Japan's military to reinforce United States in Asia and beyond

Yet as with many US allies, there are growing tensions between the countries over Mr Trump's attitude toward trade. The President has said he may enact tariffs on imports of foreign cars, calling them a threat to national security - an allegation called preposterous by automakers and many US lawmakers.

It's unsettled in American law whether the President can withdraw from a ratified treaty without congressional approval. President George W. Bush withdrew from the Anti-Ballistic Missile Treaty in 2002 without lawmakers' consent.

Mr Trump regards Japan's repeated efforts to move a large US military base in Okinawa as a sort of land-grab, the people said, and has raised the idea of seeking financial compensation for American forces to relocate.

Mr Trump's focus on the US defence pact with Japan may foreshadow broader scrutiny of American treaty obligations across the world, two people familiar with the matter said.

The President has said in private conversations previously that he has Japan's back and is aware of the US's obligations under the treaty. But, as with his stance on other multilateral agreements, he wants the relationship to be more reciprocal.

"The US-Japan alliance has never been stronger," Mr Trump told sailors and Marines last month aboard the USS Wasp, an amphibious assault ship at the naval base in Yokosuka, shared by the US and Japan's Self-Defence Forces.

"This remarkable port is the only one in the world where an American naval fleet and an allied naval fleet headquartered side by side, a testament to the ironclad partnership between US and Japanese forces," he said.

At the same time, the President has long expressed scepticism of arrangements such as the North Atlantic Treaty Organisation and the United Nations.

He withdrew from the Trans-Pacific Partnership trade agreement and the Paris climate accord, both agreed by President Barack Obama, and has re-negotiated the North American Free Trade Agreement.

Related Story Okinawa overwhelmingly votes 'no' to US base relocation

The US defence treaty with Japan was first signed in 1951 along with the Treaty of San Francisco that officially ended World War Two. The defence pact, revised in 1960, grants the US the right to base military forces in Japan in exchange for the promise that America will defend the island nation if it's ever attacked.

For decades after the war, Japan refrained from developing offensive capabilities such as long-range bombers, aircraft carriers and nuclear weapons.

But Mr Abe, a relatively hawkish leader, believes his nation should take a more robust role in its own defence.

He pushed through a controversial interpretation of the Constitution to allow Japanese forces to come to the aid of allies.

Japan is buying advanced F-35 fighter planes from the US and will fly some of them off warships effectively refashioned as aircraft carriers, its first since the war.

In May, the country's ruling Liberal Democratic Party recommended the government eventually raise defence spending to about 2 per cent of gross domestic product, in line with Nato recommendations for its members and a threshold Mr Trump has said should be a minimum for US allies.

'CORNERSTONE OF PEACE'

There are presently about 54,000 US military personnel based in Japan, a permanent troop presence that allows the US to more easily project force across the Pacific. US Forces, Japan, calls the arrangement "the cornerstone of peace and security in the Pacific" on its website.

It isn't clear how those forces would be affected if Mr Trump withdrew from the treaty.

The President has frequently complained that US allies hosting American bases don't pay enough money for what he considers a privilege, and he could seek to negotiate a new or revised treaty that entails more Japanese financial support for the US military presence.

While the President did not refer to the base by name in his recent conversations, there has been a running dispute surrounding Marine Corps Air Station Futenma on Okinawa.

The American presence has been controversial for more than two decades, since three servicemen raped a 12-year-old Okinawan girl in 1995.

Local people still attribute the presence of the base to higher rates of crime and accidents in the area, according to the Council on Foreign Relations.

Withdrawing US forces entirely from Japan would hand a strategic victory to American adversaries China and North Korea.

Dr James Carafano, vice-president of foreign and defence policy studies at the Heritage Foundation, said he doubts the US will withdraw from the treaty with Japan.

"There's nothing that says we have to abide by treaties for all eternity," Dr Carafano said. "I just doubt we will revisit US policy on the US-Japan strategic alliance," which he also referred to as the "cornerstone" of US foreign policy in Asia.

Mr Abe reached a deal in 2013 with Mr Obama to move the base out of Okinawa as early as 2022 if a replacement could be constructed. But Mr Trump believes the land underneath the base is valuable for development, and has told confidants the real estate could be worth about US$10 billion (S$13.53 billion), the people said.

He considers the situation another example of a wealthy country taking advantage of the US, the people said.