Putin and Donald Tusk, his Polish counterpart, both agreed their countries' historians must work together to uncover events surrounding the outbreak of war, including the murder of Polish officers in a forest at Katyn in 1940.

'Cannot forget'

For many Poles, the events symbolise what they see as Stalin's treachery and cruelty.

"The truth can be painful, but it should not humiliate anybody... If prime minister Putin's declaration means that for Russia, seeking the truth about those events is not a humiliation but a thought-out, wise strategy to reach an understanding for the future, then we are happy," Tusk said. 

"Two totalitarian states decided the fate of this war, first as allies, then as enemies," Tusk said, referrring to Russia and Germany's switch from allies to adversaries.

"We cannot forget how much blood Soviet troops left on our soil. Nothing which happened after 1945 can change this."

The second world war began when Nazi Germany invaded Poland in 1939 [AFP]

Their comments came as European leaders gathered in Westerplatte near Gdansk, the Polish seaport where the second world war began on September 1, 1939.

Putin's visit was the first made by a senior Russian official to the war memorial ceremony.

Earlier, Russian officials reacted angrily to a push from Poland and Baltic states to equate Stalinism with Nazism.

Sergei Lavrov, Russia's foreign minister, expressed fury over the moves in an article published in Rossiiskaya Gazeta on Tuesday.

"Even during the Cold War no-one ever tried to put the Nazi regime on one level with the Stalin dictatorship," he said.

"It never occurred to anyone to equate the Nazi threat, which meant the annihilation of whole peoples, and the politics of the Soviet Union, which was the only force able to resist the war machine of Hitler's Germany."

Nazism and Stalinism

His comments were in reaction to a resolution by the Organisation for Security and Co-operation in Europe (OSCE) parliamentary assembly in July, proposed by Lithuania and Slovenia, that likened Nazism and Stalinism.

The OSCE resolution also proposed making August 23, the date of a pact signed between Nazi Germany and the Soviet Union on the eve of the German invasion of Poland, as a memorial day for victims of Nazism and Stalinism.

Nazi Germany sparked the second world war when it invaded Poland on September 1, 1939.

About six million Poles were killed in the war, half of them Jews, while its main cities were left in ruins.

In proportion to its size, Poland suffered more damage and casualties than any other country involved.