LIMA (Reuters) - Japanese Prime Minister Shinzo Abe told Chinese President Xi Jinping on Sunday that he aims to improve ties with China by capitalizing on key anniversaries for bilateral relations in the next few years, a Japanese government spokesman said.

The two leaders held impromptu talks while attending the Asia-Pacific Economic Cooperation (APEC) summit in Lima.

Abe told Xi he would like to seek comprehensive improvement of ties with eyes on the 45th anniversary of the normalization of diplomatic relations next year and the 40th anniversary of the Japan-China peace and friendship treaty in 2018, the spokesman said.

China's Foreign Ministry said the brief talks happened at the request of the Japanese side.

"President Xi Jinping stated clearly China's principled position on developing Sino-Japan relations," the ministry said, without elaborating.

Ties between China and Japan, the world's second- and third-largest economies, have long been strained by a territorial dispute.

(Reporting by Kiyoshi Takenaka; Additional reporting by Ben Blanchard in Beijing; Editing by Alan Crosby and Sandra Maler)