TOKYO - Japan’s prime minister urged the Chinese president to reset dangerously frayed ties between Asia’s two largest economies when they met on the sidelines of the G20 summit in Russia.

The meeting was the first between leaders of the two countries since relations took a nosedive last year over the ownership of uninhabited islands, in a row that has led to warnings of a possible armed confrontation.

“Prime Minister Abe explained (to Xi) about our thoughts that we should develop Japan-China relations by going back to the original point of the strategic, mutually beneficial relationship,” Chief Cabinet Secretary Yoshihide Suga told reporters in Tokyo.

A Japanese embassy spokesman in Moscow said the two leaders shook hands and spoke for about five minutes Thursday at the meeting of world leaders in the Russian city of Saint Petersburg.

Despite the huge economic importance of the relationship between Asia’s two largest powers, the pair have not met since the hawkish Abe took office in December and Xi in March. According to Chinese state news agency Xinhua, Abe said he had been looking forward to seeing Xi in Russia and that “I am eager to improve Japanese-Chinese relations”.

The agency, which called the encounter “polite”, cited Xi as telling Abe that Beijing wants to improve ties “on the basis of the four Chinese-Japanese political documents” - a reference to agreements hammered out from the early 1970s onwards as the two countries normalised relations. At a press conference in Beijing on Friday, foreign ministry spokesman Hong Lei said the meeting had taken place “in the VIP room”. “President Xi emphasised that Japan should face squarely history and look into the future and deal with... sensitive historical issues correctly and find appropriate means to manage and solve the relevant dispute and issue,” he said.

Beijing regularly charges that Tokyo has not made sufficient amends for its aggressive and acquisitive behaviour in the middle of the 20th century, and that Japan plays down the extent of its wrongdoing. Japan says it has apologised and maintains that Beijing uses history to beat its neighbour and as a rallying cry at home to distract domestic attention from problems.

Often-difficult relations between the world’s second and third largest economies worsened significantly in September last year when Japan nationalised islands it already controlled under the name Senkakus.

Beijing says the archipelago, which it calls the Diaoyus, was illegally snatched by Japan at the close of the 19th century, and demands its return.

Official Chinese ships - latterly the country’s coastguard - have regularly plied the waters around the islands in the East China Sea, where they are warned off by Japan’s coastguard.

The two countries’ militaries have also been involved, with fighter planes scrambled numerous times and warships eyeing each other, although there has been no contact.

However, observers warn the spat has the potential to turn into an armed confrontation - possibly after a misstep by one side - that risks dragging in other countries.

While Tokyo has been careful to maintain its public position that it is always ready for talks with Beijing, Abe’s administration has been resolute in saying the islands’ sovereignty is not up for discussion.

In a commentary published Friday, Xinhua acknowledged Tokyo’s suit.

“Beijing has shown no interest in the overtures due to Tokyo’s lack of sincerity,” it said. “While extending an olive branch, Japan has never stopped making offensive remarks and provocative moves that destroy the mood for dialogue.

“Tokyo’s continuous denial of history and hardline position on the territorial dispute have effectively prevented any talks from being meaningful.

“A polite encounter may be a good start, and it shows Beijing’s willingness to bring its relations with Japan back on the right track, but whether that can happen still rests with Tokyo.

“It is better for the doer to undo what he has done. It was Japan that triggered the ‘grave difficulties’ in bilateral relations, so it should be Japan that takes the initiative to break the stalemate.”