BEIJING (Reuters) - China marked the 80th anniversary of the Nanjing Massacre on Wednesday with a call to work with Japan for peace, but President Xi Jinping kept a low profile and left the main public remarks to another senior official.

China and Japan have long sparred over their painful history. China consistently reminds its people of the 1937 massacre in which it says Japanese troops killed 300,000 people in what was then its capital.

A postwar Allied tribunal put the death toll in the eastern city of Nanjing at 142,000, but some conservative Japanese politicians and scholars deny a massacre took place at all.

Ties between China and Japan, the world’s second- and third-largest economies, have been plagued by a long-running territorial dispute over a cluster of East China Sea islets and suspicion in China about efforts by Japanese Prime Minister Shinzo Abe to amend Japan’s pacifist constitution.

However the two countries have sought to get relations back on track, and Abe and Xi met last month on the sidelines of a regional summit in Vietnam.

Speaking at a memorial in Nanjing, Yu Zhengsheng, who heads a high-profile but largely ceremonial advisory body to China’s parliament, said China and Japan were neighbours with deep historic ties.

China would deepen relations with all its neighbours, including Japan, on the basis of amity, sincerity and friendship, Yu said, in comments carried live on state television.

Slideshow ( 8 images )

“China and Japan must act on the basis of both their people’s basic interests, correctly grasp the broad direction of peaceful and friendly cooperation, take history as a mirror, face the future and pass on friendship down the generations,” Yu said.

A sombre Xi, wearing a white flower in his lapel to symbolise mourning, stood in the audience but did not speak.

Doves to signify peace flew overhead after Yu finished speaking.

Xi later met massacre survivors, the official Xinhua news agency said, telling them, “Lessons learned from the past can guide one in the future”.

South Korean President Moon Jae-in, who arrived in Beijing for a four-day visit, offered condolences to the victims in a speech to businessmen, in what his office called the first such public mention of the massacre by a South Korean leader.

In Tokyo, Chief Cabinet Secretary Yoshihide Suga spoke of the importance of looking to the future.

“The leaders of Japan and China have agreed in past meetings to further improve relations and it is important, while cherishing this trend, to together show a future-oriented stance,” Suga told a regular news conference:

It was the second time Xi has attended the event since China marked its first national memorial day for the massacre in 2014.

At that time, he called on China and Japan to set aside hatred and not allow the minority who led Japan to war to affect relations now.