Russian President Vladimir Putin got the world's attention on May 10 when, during a joint press conference with German Chancellor Angela Merkel, he unapologetically defended the infamous 1939 nonaggression pact between Adolf Hitler's Germany and Josef Stalin's Soviet Union.

The so-called Molotov-Ribbentrop Pact -- named after the two foreign ministers who signed it in the late-night hours of August 23, 1939 -- was formally a nonaggression pact. But it also encompassed a secret protocol under which the two dictatorships agreed to carve up Eastern Europe.

The agreement paved the way for Hitler's invasion of Poland on September 1 of that year, as well as the Soviet Union's invasion of eastern Poland in the following weeks and its occupation of the Baltic states in 1940.

In his comments with Merkel, Putin said the pact "made sense for ensuring the security of the Soviet Union" after what he described as Stalin's "repeated efforts" throughout the 1930s to form an anti-Hitler coalition with Western countries.

In addition, Putin chastised Poland for annexing some 900 square kilometers of Czechoslovakia in 1939 after Western powers signed the Munich Agreement that triggered Germany's occupation of Czechoslovakia.

Although Putin's latest comments on the topic were his most public, it was at least the second time he has made exactly the same arguments. In a meeting with young Russian academics in November 2014, Putin defended the pact and said that Poland had gotten its "payback."

"People are still arguing about the Molotov-Ribbentrop Pact to the present day," Putin said. "And they accuse the Soviet Union of carving up Poland. But what did Poland itself do when the Germans occupied Czechoslovakia? They grabbed a piece of Czechoslovakia! (Laughs) They did that before the end of May [1939]! (Laughs) And then they got their payback."

Nikita Petrov, a senior researcher with the Memorial foundation, which studies and documents Stalin's Great Terror, says Putin's comparison was out of place.

"We are talking about a much greater crime on the part of the Soviet Union, which concluded the secret protocol in August 1939 on the division of spheres of influence," Petrov says. "And it didn't just define spheres of influence -- it occupied and destroyed the independence of neighboring states. That is a crime against international law."

Russian officials are trying to cast the pact in a far better light. Putin's conservative culture minister, Vladimir Medinsky, recently described Molotov-Ribbentrop as "a great achievement of Soviet diplomacy."

Petrov says Putin's statement is "symptomatic because it repeated what has infused the current political atmosphere" in Russia.

"The current return to justifying the [Molotov-Ribbentrop] pact is really a reflection of today's politics," Petrov told RFE/RL's Russian Service. "These days in Russia, we are seeing a return to the methods of division into spheres of influence, secret deals. That's why -- especially this year -- we are seeing all these calls for a second Yalta, a second Helsinki. They are the product of this harmful idea that the world can be divided, carved up, and that such an agreement can be secretly reached by the same principles that were used by totalitarian Germany and the Soviet Union."

The Molotov-Ribbentrop Pact has had a tortured history in the Soviet Union and Russia. For decades the Soviets denied that the secret protocol existed, even after the United States released a copy that had been captured from Germany.

In December 1989, the Soviet Congress of People's Deputies condemned the agreement in a formal resolution. However, the document itself was only released by the Russian Foreign Ministry in 1992.

Petrov says this history clearly indicates Russia has not always been as sympathetic to the agreement as Putin seems to be now.

"How did we describe bourgeois diplomacy back in Soviet times? We said they used the methods of deceit, blackmail, ultimatums, military force, and economic expansionism. All of this is from Soviet encyclopedias," Petrov says. "After that, to admit to what we did in 1939 would have been pure suicide. So that's why the pact was kept secret as long as possible."

Putin's own attitude toward the pact has also come a long way. During a joint press conference with leaders of the Baltic states in July 2008, Putin -- who was then Russia's prime minister -- flatly rejected the pact and cited the 1989 Soviet resolution.

"Consider, please, the statement of the Congress of People's Deputies from 1989 where it is written in plain black and white that the Congress of People's Deputies condemns the Molotov-Ribbentrop Pact and considers it not legally binding," Putin said. "[The pact] did not reflect the opinion of the Soviet people but is a personal matter between Stalin and Hitler."

Playwright Aleksandr Gelman was a deputy who participated in that landmark 1989 debate.

"It was a remarkable day," Gelman remembers. "At the very least, the truth became known. It was already known around the world, of course, but that day it became known to our people and that was really important."

Vytautas Landsbergis, who went on to become independent Lithuania's first post-Soviet head of state, was also a deputy in the historic congress. He notes that, because that body had representatives from all the republics of the Soviet Union, even Russia's State Duma does not have the real authority to undo its Molotov-Ribbentrop resolution -- although he would not be surprised if they tried.

Landsbergis says that the period of the late 1980s and early 1990s saw a genuine effort by Russia to acknowledge its history and mend its relations with its neighbors.

"We signed agreements with [Russia] like normal people, like one state to another," Landsbergis recalls about the first term of Russian President Boris Yeltsin. "Yeltsin didn't want to conquer those countries again. But after him the revanchists came -- he wasn't a revanchist. He wanted, at least at the beginning, to look in a new way and to build a new Russia that was not communist, not dominated by the KGB. But that moment was lost."

Analyst Petrov says that the process of rehabilitating Stalin in Russia is proceeding rapidly. Regarding the Molotov-Ribbentrop Pact, he says, he increasingly often sees people commenting on the Internet that the secret protocol never even existed.

"Some historians are writing such things today," he says. "It is pure obscurantism."

Gelman worries that the rehabilitation of Stalin and the reinterpretation of the Molotov-Ribbentrop Pact are leading to a dangerous situation in Russian society.

"What we are seeing now is the preparation for some kind of aggression," Gelman says. "Society is being prepared for the idea that we might have to fight. Although in reality there are no real reasons for a world war at present, except for our own insane ideas. But we have to remember that insane ideas can be made real. They can be accepted by the people as good ideas. And this is the situation that is developing now."

Based on reporting by RFE/RL Russian Service correspondent Vladimir Kara-Murza