Tokyo: US President Barack Obama vowed on Thursday to defend Japan if China attacks over a tense territorial dispute, but also urged Beijing to help stop North Korea from forging ahead with its “dangerous” nuclear programme.

Obama described as “critically important” China’s role in keeping its wayward ally in check after South Korea said heightened activity at the North’s main nuclear test site could point to an imminent test — its fourth.

“China’s participation in pushing the DPRK (North Korea) in a different direction is critically important,” the president told a joint press briefing with Japanese Prime Minister Shinzo Abe.

“It is the most destabilising, dangerous situation in all of the Asia-Pacific region.”

Despite his call for China’s help, Obama also underlined US support for Japan, saying that islands at the centre of its bitter territorial dispute with Beijing are covered by a defence treaty that would oblige Washington to act if they were attacked.

“Article five (of the US-Japan security treaty) covers all territories under Japan’s administration including (the) Senkaku islands,” he said, referring to the East China Sea archipelago which Beijing calls the Diaoyus.

“We do not believe that they should be subject to change unilaterally, and what is a consistent part of the alliance is that the treaty covers all territories administered by Japan.”

Obama added that “this is not a new position” and “there’s no red line that’s been drawn”.

“We stand together in calling for disputes in the region, including maritime issues, to be resolved peacefully through dialogue,” he said.

Relations between Tokyo and Beijing are at their lowest point for years. Some observers warn they might come to blows over the islands, where ships from both sides lurk to press claims for ownership.

Abe’s position on historical issues also annoys the Chinese, who accuse him of playing down Japanese atrocities. They are particularly upset by visits he and his cabinet ministers have paid to the Yasukuni Shrine, which honours war criminals among other fallen warriors.

In another sign of history influencing the present, China on Thursday said it had released a Japanese ship seized after its owner paid $28 million (Dh103 million) compensation in a business dispute dating to Japan’s occupation of swathes of the country in the 1930s.

Tokyo warned earlier this week that the seizure could have a chilling effect on the huge trade relationship between China and Japan.

Ministers fear a flood of Chinese compensation claims over wartime wrongs, which they say were all dealt with under the 1972 normalisation of ties.

Japan and other Western-leaning countries say China is also throwing its new-found economic and military weight around in pursuit of territorial claims in the East and South China Seas.

Along with Manila — the fourth stop on Obama’s tour — Tokyo craved reassurance that the US was prepared to support it if push comes to shove with Beijing over their separate sovereignty rows.

In response to Obama’s comments, China said on Thursday that it was working to avoid a crisis on the tinderbox Korean peninsula.

“The peace and stability of the Korean peninsula is in the immediate interest of China,” Chinese foreign ministry spokesman Qin Gang told a regular press briefing.

“We will by no means allow war or chaos to occur at the doorstep of China. And we’ll be encouraging all relevant parties to resolve relevant issues peacefully through dialogue and consultation.”

However, Qin dismissed Obama’s stance on the Japan island dispute, saying that “no matter what others say or do it cannot change in the slightest the basic fact that the Diaoyu Islands are China’s inherent territory”.

Progress on the Trans-Pacific Partnership (TPP) — a proposed 12-nation free trade bloc — was stalled despite high hopes that the US president’s visit would result in a breakthrough for a deal that is a vital prong of Obama’s Asia pivot.

On Thursday Obama said the two sides had yet to find common ground, with high tariffs on Japanese agricultural products among the key sticking points.

“Now is the time for bold steps,” he said.

If Obama had hoped to concentrate on Asia during a trip that was aimed partly at compensating for his no-show in the region last year, he was soon pulled back to other pressing global issues.

With tensions in eastern Ukraine continuing to mount Obama laid the blame at Russia’s door, and threatened further action — including more sanctions — unless the Kremlin reins in pro-Russian gunmen who have taken over public buildings there.

“There was some possibility that Russia could take the wiser course after the meeting in Geneva. So far at least we have seen them not abide by the spirit or the letter of the agreement in Geneva,” he said.

Amid the geopolitics, Obama also found time for some quiet spiritual reflection with a stop at the gracious Meiji Jingu, a huge shrine in central Tokyo dedicated to the Emperor Meiji, whose return to prominence in 1868 marked the birth of modern Japan.

After passing through the wide open courtyard, Obama toured the inner shrine and paused at a lectern to write a prayer on a wooden plaque.

Obama’s trip will also take him to South Korea, Malaysia and the Philippines.