Donald Trump was headed to the G20 on Thursday amid a growing row with Japan over its contributions to its defence pact with the US.

Mr Trump added fuel to the fire by suggesting the current deal allows Tokyo to stand back and watch America being attacked "on a Sony television".

The US president’s comments came as he reiterated that he does not believe Japan is contributing sufficiently to the bilateral security agreement and hinted that he will demand a bigger commitment from Tokyo while he is in Japan for the G20 summit. 

Speaking on Fox Business Network on Wednesday, immediately before he left for the Osaka summit, Mr Trump questioned the fairness of a treaty that was initially signed in 1951 and which subsequent US and Japanese administrations have considered to be the cornerstone of security in north-east Asia. 

“If Japan is attacked, we will fight World War Three”, the president said in the interview. “We will go in and protect them with our lives and with our treasure. We will fight at all costs, right?”

“But if we are attacked, Japan doesn’t have to help us at all”, he said. “They can watch on a Sony television the attack”. 

Mr Trump was quoted by Bloomberg News earlier in the week as having privately indicated that he was considering withdrawing from the defence agreement because it favours Japan. 

Those comments came after he said Tokyo should do more to protect its own concerns rather than relying on the US after a Japanese tanker was damaged in an attack in the Straits of Hormuz that Washington has blamed on Iran. 

Officials in Tokyo and Washington were quick to declare that the security relationship remains solid, although those claims were undermined by Mr Trump’s subsequent comments on Fox.

The president has levelled similar accusations against a number of Washington’s closest security partners, including South Korea, apparently in an effort to force the government to pay more for the US troops that are stationed in the country. 

Emanuel Pastreich, president of the Asia Institute in Seoul, said other long-standing allies in the region, including Taiwan and Australia, will be looking on with concern.

“At a time of unprecedented tension in this region, this is the last thing that America’s allies want to hear”, he told The Telegraph. “And while Mr Trump is upsetting his friends, China and North Korea will be looking on and sensing that this is an opportunity”. 

Japan has refrained from replying to the president’s comments immediately before he arrived in Osaka for the G20 talks, although a government official did comment to The Telegraph that, “all this does is trigger discussions in Beijing and Pyongyang about the decreasing US influence in north-east Asia”.