History has become a weapon in Russia's battle with the West over Ukraine as President Vladimir Putin looks increasingly to the past to whip up patriotism and rally support.
Last month's lavish commemorations of the defeat of Nazi Germany in World War II, several declarations by Putin and new history textbooks have all presented what some independent historians say are slanted or rewritten versions of the past.
The Nazi-Soviet pact that divided Poland in 1939 — and saw Moscow seize much of what is now Ukraine, Belarus and the Baltic states — is now seen in a positive light. A new justification has been found for the Soviet-led invasion of Czechoslovakia in 1968 and some of Soviet dictator Josef Stalin's worst crimes have been played down.
"It is an aggressive stance in the debate over history," said Alexei Miller, a history professor at the European University in St. Petersburg, who says all sides have been distorting the past during the conflict. "History is a victim of the current crisis in relations between Russia and Europe."
He says "wars of memory" are being waged with the West and ex-Soviet neighbors such as the Baltic states and Ukraine, where history is increasingly being interpreted in different ways to suit political views.
Putin, who denies Western accusations of sending troops and weapons to pro-Russian separatists in eastern Ukraine, has made clear that he understands the power of history.
This is perhaps not surprising for a man brought up in the Soviet Union, where history was vetted to glorify communism, denigrate the West and denounce "enemies of the people."
"When we show that we are right and our actions benefit society, the state and people, millions of our supporters will appear," Putin said at a meeting with historians last November.
He has also taken a close interest in new history textbooks for schools that describe his own success in "securing social unity and agreement" at home while "consistently defending national interests" abroad.
Russian children will also learn in the new textbooks how Putin's Soviet and tsarist predecessors repeatedly defended Russia against Western aggression and machinations.
The textbooks state as fact that the 1939 pact that divided Poland was a justified response to Western policies aimed at encouraging Adolf Hitler to attack the Soviet Union.
Putin has defended the pact several times, including during a visit by German Chancellor Angela Merkel in May, when he said it made sense "for defending the national security of the Soviet Union."
State media is an important weapon in Russia's information war with Ukraine and the West, which imposed economic sanctions on Russia after it annexed the Crimea Peninsula from Ukraine last year. They are also part of the battle over the past.
Rossia-1 television aired a documentary on May 23 that gave a new explanation for the 1968 invasion of Czechoslovakia, then part of the Soviet bloc, by Communist Warsaw Pact armies that crushed the Prague Spring, intended to create "socialism with a human face."
Citing what it called newly discovered documents, it said the invasion was needed to protect the country against a NATO-backed coup being planned under the cover of the Prague Spring.
Czech and Slovak officials said the program distorted the facts. Slovakia's Foreign Ministry said Slovaks "refute all attempts at rewriting history."
During the crisis in Ukraine, Moscow has portrayed ethnic Russians or Russian speakers living in the former Soviet republic as threatened by fascists.
Russia has now introduced a law which criminalizes the "rehabilitation of Nazism" and makes it punishable by up to three years in prison.
The law attracted attention when investigators opened a case against a 16-year-old for posting comments on social media they said praised Nazi Germany's invasion of Poland in 1939. Authorities have also used the law to open criminal cases against defacers of Soviet monuments, including in Ukraine.
Unlike similar laws in other countries, Russia's also criminalizes "knowingly spreading false information about the activities of the U.S.S.R. in World War II."
The Baltic states and Ukraine have also passed laws about history. Ukraine has banned Communist symbols and made it a criminal offense to deny the totalitarian nature of Soviet rule from 1917 to 1991 or to question the legitimacy of anti-Soviet nationalist groups that at times cooperated with the Nazis.
Critics see Russia's law as part of a growing pattern by authorities to stifle discussion about history and cover up negative chapters.
"Access to the archives is getting worse and worse," said Sebastian Stopper, a historian at Humboldt University in Berlin. "It's just politically desired for now not to shed light on crimes of the Russian state in the 20th century."
Stopper, an expert on Soviet partisans in World War II, fell foul of an earlier Russian law against "extremism" when a court last year classified postings he made on the Internet as extremist.
He said his posts largely consisted of extracts from Nazi documents and included some of his own comments, which he says tried to explain German soldiers' mentality.
"Of course there was nothing justifying Nazi war crimes," he said. He said he suspected the real reason his research ruffled feathers in Russia was because it challenged previous claims about the partisans' effectiveness, long accepted as facts in Russian histories.
Miller said that a common perception in the West, that Putin is an admirer of the Soviet system and Stalin, was unfair.
Russian history textbooks do have sections dealing with the purges, famines, labor camps and deportations under Stalin, but they are typically quieter about similar Soviet repressions against other countries' citizens.
Some of Putin's recent pronouncements on history have been critical of former Communist rulers when he sees their actions as undermining Russia's international interests.
Last year he blamed the Soviet government for giving away what he said were traditional Russian territories to Ukraine in the 1920s. And in an implicit swipe at Lenin's Bolshevik revolutionaries, he said that victory in World War I "had been stolen by those who called for defeat of their Fatherland."
"Putin is obviously a Great Power man. For him this is the central issue of the Russian agenda: to preserve the status of a Great Power. From this perspective he is obviously critical of the Bolsheviks," Miller said.
But he added that, in the current standoff with the West, the state's interest in promoting public discussion and education about Stalinist crimes had waned.
"It is now more about the West as the enemy, more about the acts of aggression of the West against Russia in various historical periods."