US President Barack Obama vowed 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 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 newfound 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.
Abe is the kind of dynamic leader that Washington, frustrated by years of stagnation in Japanese politics and the economy, had longed for.
"My administration intends to continue to contribute to regional peace and prosperity more pro-actively than ever," Abe said.
While the noises on security were positive, progress on the Trans-Pacific Partnership (TPP) -- a proposed 12-nation free trade bloc -- was stalled.
The two men had hoped to be able to announce a breakthrough of sorts after days of intense talks aimed at shifting a log-jam over autos and agricultural products, with powerful vested interests on both sides tying negotiators' hands.
Senior US officials and business figures acknowledge progress with Japan is critical to hopes of concluding the TPP, a vital prong of Obama's Asia pivot.
But on Thursday Obama said the two sides had still 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 to the region 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 further 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.
The tablet would normally be strung on a frame around a large camphor tree in the courtyard, but the presidential prayer was taken away by a priest.
Obama's trip will also take him to South Korea, Malaysia and the Philippines.