Tokyo on Sunday criticised Chinese President Xi Jinping for making remarks during a trip to Germany about Japan's wartime atrocities, adding that the government had lodged a protest.

At a think tank forum Friday in Berlin, Xi criticised Japan's wartime atrocities, saying the Japanese military killed more than 300,000 people in Nanjing in 1937 when it occupied the Chinese city, Jiji Press and Kyodo News reported.

Xi also said more than 35 million Chinese people were killed or injured as Japan waged a war of aggression stemming from its militarism, Kyodo said.

"It is extremely unproductive that a Chinese leader makes such remarks about Japanese history in a third country," Chief Cabinet Secretary Yoshihide Suga told reporters.

He also said Japan's Foreign Ministry has lodged a protest with the Chinese government on Saturday.

History bears heavy on the Japan-China relationship, most weightily in Nanjing.

Japan invaded China in the 1930s and the two countries fought a full-scale war from 1937 to 1945.

China says more than 300,000 people were slaughtered by Japanese troops in a six-week killing spree in the then capital Nanjing, which began on December 13 1937.

Though some foreign academics put the number of deaths much lower, no respected mainstream historians dispute that a massacre took place.

Japan, which was occupied after its defeat and became a vibrant liberal democracy, has issued apologies for its wartime conduct in Asia.

But frequent statements by conservative politicians and public figures seemingly backstepping from them or calling into question issues of historical fact have increased suspicion of the country's motives.

Beijing and Tokyo are also locked in a row also over ownership of a group of small uninhabited islands in the East China Sea.

On Friday, China berated Japanese Prime Minister Shinzo Abe for reportedly drawing an analogy between the Crimea crisis and a row between Beijing and Tokyo over the disputed islands.