* Russians, Europeans at odds over Stalin's role
* Russia, Poland to look into darker parts of shared past
* "Huge number of mistakes by all sides" - Putin
(Adds fresh Putin, Tusk, Kaczynski quotes, Merkel, background)
By Gabriela Baczynska and Denis Dyomkin
SOPOT, Poland, Sept 1 (Reuters) - Russian Prime Minister Vladimir Putin rejected criticism of Moscow's role just before World War Two during ceremonies on Tuesday marking the 70th anniversary of Nazi Germany's invasion of Poland.
But Putin and Polish Prime Minister Donald Tusk agreed their countries' historians should work more closely to uncover darker parts of their shared past which still cloud relations 20 years after the collapse of communism in eastern Europe.
Russia and former satellites such as Poland are at loggerheads over the actions of Soviet dictator Josef Stalin in 1939, when he clinched a non-aggression pact with Nazi Germany that opened the way for the invasion of Poland and world war.
"If we are going to speak objectively about history we must understand it does not have just one colour. It was diverse and a huge number of mistakes were made by all sides," Putin told a news conference after talks with Tusk in the resort of Sopot.
"And all these actions created the conditions for the large scale aggression by Nazi Germany."
Russians are deeply proud of their country's victory over Hitler in 1945, but Poles, Balts and others say Stalin also bears direct responsibility for the outbreak of war, for carving up Poland with Hitler and also annexing the Baltic states.
Putin cited efforts by Britain and France to appease Hitler in 1938, resulting in their acceptance of the destruction of Czechoslovakia, as well as Poland's own seizure of a strip of Czech territory shortly before it too faced German invasion.
Addressing war veterans and other European leaders later, Putin said the non-aggression pact clinched by Stalin's Foreign Minister Vyacheslav Molotov and Germany's Joachim von Ribbentrop in August 1939 was a mistake, but added: "We now have the right to expect other countries which accepted a deal with the Nazis to follow suit (in acknowledging their mistakes)."
BATTLE FOR PAST
His comments will not satisfy the Poles and Balts, who regard Stalin's actions as a stab in the back and also recall the mass deportations and executions of their countrymen that followed the Soviets' arrival.
In a speech at the Westerplatte monument near Gdansk, where German forces fired the first shots of World War Two on Sept. 1, 1939, Tusk said historical truth must prevail.
"Different interpretations are allowed but the facts are the same. We want to remember these facts not to use history against anybody but for them to serve as a basis for peace," he said.
Putin and Tusk agreed to offer historians reciprocal access to their nations' archives and to set up joint groups of experts to study the murder of Polish officers in a forest at Katyn in the western Soviet Union in 1940 -- an event which for Poles symbolises Stalin's treachery and cruelty.
"We Poles have the right to the truth about the tragedy that befell our people and we cannot give up this right," Polish President Lech Kaczynski told the gathering at Westerplatte.
Poland wants Russia to apologise for Stalin's decision to have 20,000 Polish officers shot at Katyn. For decades, Moscow blamed the deaths on the Nazis, but after the fall of the Soviet Union it acknowledged they had been shot on Stalin's orders.
Kaczynski compared Katyn to the Nazi genocide of the Jews.
"There's one thing linking those crimes, though their scale was different. Jews perished because they were Jews. Polish officers perished because they were Polish officers," he said.
German Chancellor Angela Merkel, the prime ministers of Italy and France and Britain's foreign secretary were among other guests attending Tuesday's commemorative events in Poland. U.S. President Barack Obama sent a high-level delegation with a message praising Poland's wartime struggle for freedom.
Poland lost about a fifth of its population, including the vast majority of its three million Jewish citizens, as well as a fifth of its territory during World War Two. After the war, it remained under Soviet domination until 1989.
Some 27 million Soviet citizens perished in the war after Hitler reneged on his pact with Stalin and invaded the Soviet Union in 1941.
"I commemorate the 60 million people who lost their lives because of this war unleashed by Germany," Merkel said.
"We know we cannot change the atrocities of World War Two. The scars will remain visible. But it is our task to shape the future in the consciousness of our perpetual responsibility." (Writing by Gareth Jones; Editing by Louise Ireland and Charles Dick)