TOKYO/JAKARTA (Reuters) - Japanese Prime Minister Shinzo Abe held talks with Chinese President Xi Jinping on the sidelines of a summit in Indonesia on Wednesday, the latest sign of a thaw between the Asian rivals that came despite an awkward diplomatic backdrop.
Abe told reporters after the meeting that the two leaders agreed to work for better relations and contribute to regional stability by promoting "mutually beneficial strategic ties".
Noting that Sino-Japanese ties had begun to improve when he met Xi late last year, Abe said: "We want to make the improving trend in the bilateral relations solid."
The meeting took place despite a speech at the Asian-African summit by Abe in which he warned powerful nations against imposing on the weak, an implicit reference to China. He also made an allusion to Tokyo's remorse in the past over World War Two without issuing a fresh apology.
Earlier on Wednesday, lawmakers from Abe's ruling party and the opposition visited a Japanese war shrine in Tokyo that is seen in China as a symbol of Tokyo's past militarism.
Nevertheless, the two leaders met for about half an hour, signaling the desire of both nations to mend frayed ties and promote a cautious rapprochement.
"The confrontation between China and Japan has eased and China and Japan have restored their diplomatic dialogue," said Shi Yinhong, a professor of international relations at Renmin University in Beijing.
"No matter what, China and Japan don't want to return to the previous state of fever-pitch confrontation," Shi said.
Tensions between Asia's two biggest economies have flared in recent years due to feuds over wartime history, as well as territorial rows and regional rivalry.
Abe urged Xi at their meeting to work together to ease tensions in the East China Sea, where they have rival claims to tiny Japanese-controlled islets, Kyodo news agency reported.
Memories of Japan's past military aggression run deep in China and Beijing has repeatedly urged Japan to face up to history.
In a sign that the past still rankles, Xi was quoted by state-run China National Radio as telling Abe that he "hopes the Japanese side takes seriously the concerns of its Asian neighbors and issues a positive message of facing squarely up to history".
Abe's stance on Japan's wartime past is especially sensitive this year, when he plans to issue a statement marking the 70th anniversary of the end of World War Two.
Abe told Xi that he would uphold past apologies including a 1995 landmark statement by then-premier Tomiichi Murayama, Kyodo reported. But Abe has also said he wanted to issue forward-looking remarks in his own words, sparking concern he wants to water down past apologies.
Abe said in his Jakarta speech that Japan had, "with feelings of deep remorse over the past war", pledged to adhere to principles affirmed at the first Bandung Conference, including refraining from the use of force and settling international disputes by peaceful means.
Abe also said: "We should never allow to go unchecked the use of force by the mightier to twist the weaker around.
"The wisdom of our forefathers in Bandung was that the rule of law should protect the dignity of sovereign nations, be they large or small," he said. The gathering marks the 60th anniversary of the Bandung Conference, a meeting of Asian and African leaders opposed to colonialism.
China is locked in territorial rows with several smaller countries in the South China Sea while Japan has a separate feud over islets in the East China Sea.
Abe often warns against the use of force to change the status quo and says the rule of law should prevail - both seen as implicit criticism of China's assertiveness.
Xi had spoken at the conference earlier but did not make any reference to relations with Japan.
In Beijing, China's foreign ministry protested against the visit to the Yasukuni shrine by the Japanese lawmakers.
"In this sensitive year, Japanese politicians should adhere to correct historical views and do more to promote reconciliation and mutual trust with Asian neighbors, and not the opposite," said Foreign Ministry spokesman Hong Lei.
Abe's speech in Jakarta will be followed by a speech to the U.S. Congress next week and a statement in August marking the anniversary of the end of World War Two.
Additional reporting by Tetsushi Kajimoto, Elaine Lies, Kiyoshi Takenaka and Takaya Yamaguchi in TOKYO, Michael Martina and Sui-Lee Wee in BEIJING and Nicholas Owen and Randy Fabi in Jakarta; Editing by Raju Gopalakrishnan and Alex Richardson