In mid-1939 German Chancellor Adolf Hitler had a problem. He wanted to go to war with the Soviet Union in order to grab precious Lebensraum, or living space — and eradicate the Bolshevik menace. The Western powers, however, namely Great Britain and France, refused to make a deal with him.

Instead, they guaranteed the security of Poland, the next obvious Nazi target and pathway to the USSR. He wanted to avoid a two-front war, which ended badly for the Germans in World War I. So the Austrian corporal turned German Führer sought a deus ex machina. He found it on August 23, 1939, when the Treaty of Non-Aggression Between Germany and the Union of Soviet Socialist Republics, also known as the Hitler-Stalin Pact and Molotov-Ribbentrop Pact, the names of the respective dictators and foreign ministers who negotiated the agreement’s terms, was signed.

While diplomacy almost always is preferable to war, the two sometime coincide. Plenty of plundering marauders have made common cause. But it is hard to think of an example of greater depravity: two of the worst mass murderers in history dividing the world between them.

World War I left both Germany and Russia isolated pariah states. Germany’s new Weimar republic had expected gentler treatment by the allies, having surrendered under Woodrow Wilson’s “14 Points” and then defenestrated the Kaiser and the entire imperial system. But the Versailles Treaty placed full blame on Berlin, amputated historic Germanic lands, transferred indisputably German populations to other nations, imposed the cost of the war on the German people, and kept the democratic German government out of the League of Nations, which was designed to guarantee British and French dominance of the new international order. Ravaged by political conflict and civil strife at home, Berlin schemed to overturn the artificial territorial divide, which it never accepted.

The newly created Soviet Union, successor state to the Russian Empire, was even more isolated. Forced by Germany, which triumphed on the Eastern Front, to accept the draconian Treaty of Brest-Litovsk in 1918 — the only way for the Bolsheviks to preserve their tenuous control as civil war loomed — the Communists spent the next several years battling counter-revolutionaries while seeking to reassemble the old empire. The Americans, British, French, and Japanese intervened militarily against the new regime, first hoping to keep Russia in the war and next seeking to strangle the Soviet state in its infancy. The USSR survived, but turned inward as Vladimir Ilyich Lenin’s successors battled for control and the triumphant Joseph Stalin brutally industrialized his peasant nation.

During this time, the former enemies became friends of sorts. In April 1922, Germany and Russia signed the Treaty of Rapallo, renouncing financial and territorial claims against the other. A secret annex allowed Berlin to train military personnel and test military equipment on Soviet soil, violating the Versailles Treaty. The Treaty of Berlin, signed in April 1926, guaranteed neutrality in the event of a third-party attack on the other. Trade also expanded between the two states — especially noteworthy for Moscow, which was more isolated from capitalist markets.

Then Adolf Hitler came to power on January 30, 1933. He disliked the Western powers but bore special animus toward the Soviet Union and Bolshevism, against which he had preached war. In November, Berlin and Tokyo signed the Anti-Comintern Pact, which explicitly targeted the Communist International and USSR. Aided by substantial Communist parties active in Europe, Moscow initially looked to the West. In May 1935, France and the Soviet Union signed the Franco-Soviet Treaty of Mutual Assistance. After the September 1938 Munich Agreement and March 1939 German invasion of Czechoslovakia, Moscow, London, and Paris opened tripartite talks over military cooperation against Germany.

The barriers to agreement were significant, however. Only a fellow traveler could imagine Soviet Communism as a trustworthy bulwark for Western democracies. Poland refused to allow the passage of Soviet troops, lest they not be so quick to leave. And the British and French, uncertain and unenthusiastic, hoped war with Germany could be avoided and doubted the military value of the Red Army, which was recovering from Stalin’s purges. Divided over strategy, they stalled negotiations, sending their representatives by boat rather than air and denying them authority to make a deal.

This encouraged Stalin to seek a new foreign dance partner. In May he replaced Maxim Litvinov, the Westward-leaning (and Jewish) foreign minister, with Vyacheslav Mikhailovich Molotov, a hardened revolutionary and loyal apparatchik. The result was a whirlwind geopolitical romance, as Hitler pressed for a quick settlement that would free him to attack Poland and then deal with his European foes. The two great totalitarian rivals decided that they were united in “opposition to the capitalist democracies,” as the diplomats put it.

Of course, there were tensions, since both governments had spent years vilifying the other. Some top Nazis were uneasy about sacrificing the Finns and Balts, who were supposed to be racial kin of the Germans (and among whom many ethnic Germans lived). The political pirouettes performed by the Communists, especially party members in the West, who went from calling for war against the Reich to demanding peace with Germany, were even more dramatic. After all, few of them had before acted like they believed that “fascism is a matter of taste,” as Molotov observed when the agreement was signed.

Publicly the two governments agreed not to aid or ally with any nation against the other signatory. Through a secret protocol, Berlin and Moscow defined “spheres of influence”: the two totalitarians coldly divided Poland and apportioned influence over the three Baltic States, Finland, and Romania. (They later adjusted their shares, with continuing contempt for the territories and peoples bartered back and forth.) Moscow also became a significant supplier of raw materials to the Reich, receiving industrial and military products in return.

Stalin apparently explained his decision in a speech to the Politburo on August 19, as the agreement was being finalized — though the Soviets always denied that the talk occurred. (More than one version of the supposed text exists.) He explained why “we must accept the German proposal and, with a refusal, politely send the Anglo-French mission home.”

The Soviet dictator said the agreement with Germany ensured that Berlin would invade Poland and be at war with France and Britain. As a result, “Western Europe would be subjected to serious upheavals and disorder. In this case we will have a great opportunity to stay out of the conflict, and we could plan the opportune time for us to enter the war.”

If Berlin defeated the allies, it still would have acknowledged the USSR’s geopolitical interests, he indicated. More important, “Germany will leave the war too weakened to start a war with the USSR within a decade at least.” Berlin also would need to occupy the two allied states and exploit new territories. “Obviously, this Germany will be too busy elsewhere to turn against us” — especially after a Communist revolution would break out in France and it, along with other nations that fall under the victorious Nazis, would become Moscow’s ally.

If Germany lost to Britain and France, “a Sovietization of Germany will unavoidably occur,” said Stalin, though he was afraid that Britain and France would intervene and destroy the resulting Communist government. Therefore, he argued, “our goal is that Germany should carry out the war as long as possible so that England and France grow weary and become exhausted to such a degree that they are no longer in a position to put down a Sovietized Germany.”

Stalin’s cynicism was almost complete. He concluded that “it is in the interest of the USSR, the worker’s homeland, that a war breaks out between the Reich and the Anglo-French bloc. Everything should be done so that it drags out a long as possible with the goal of weakening both sides.” After signing the non-aggression pact, Moscow must “work in such a way that this war, once it is declared, will be prolonged maximally.”

In some ways the aftermath was predictable. Germany invaded Poland on September 1, 1939. London and Paris declared war on Berlin on September 3. The Soviets grabbed their share of Poland two weeks later, causing that nation to cease to exist. (Reestablished after the war, Warsaw was not able to reclaim the lands seized by Russia, instead annexing German lands to the west.) Next, the USSR stationed troops in and ultimately swallowed the helpless Baltic countries, placed in its sphere of influence by the Hitler-Stalin Pact. In November, Moscow attacked Finland. The latter fought heroically but was forced to cede territory to the Soviet Union. Finally, Moscow demanded Bessarabia and Northern Bukovina from Romania.

But Stalin seriously overestimated French and British military effectiveness. And Hitler was even more cynical than the Soviet leader about their deal, never abandoning his underlying animus toward Communism. In June 1940, Hitler announced that Germany’s victories in the West “finally freed his hands for his important real task: the showdown with Bolshevism.”

Perhaps even more important, German and Soviet geopolitical interests clashed in the Balkans and Finland. Negotiations ensued over enlisting Moscow as a fourth member of the Axis, but Stalin could not be diverted to the Middle East/South Asia. For a time the German Führer appeared genuinely ambivalent about which direction to move, and Molotov visited Berlin in November 1940. Some of the talks had to be held in a bomb shelter during a British air raid, embarrassing the Germans.

The following month Stalin spoke to his generals; he anticipated war but hoped to delay conflict for at least two years to give the Red Army time to prepare. He got six months. Moscow’s demands were too heavy and Germany allowed the negotiations to lapse. Hitler complained that his Soviet counterpart “demands more and more” and is “a cold-blooded blackmailer.” Thus, the USSR “must be brought to her knees as soon as possible.” When Stalin was speaking with his generals, the German military was delivering its plan for the invasion of the Soviet Union. Originally scheduled for May 15, the action ultimately began on June 22.

Operation Barbarossa ended the Russo-German entente less than two years after it was forged. Hitler expected an easy victory. Before attacking, he declared, “We have only to kick in the door and the whole rotten structure will come crashing down.” Germany’s initial victories were great, but the Soviet Union’s resources were greater. Barely four years later, on May 2, 1945, the Red Army celebrated victory in the ruins of Berlin. Hitler’s thousand-year Reich collapsed 988 years early, with the Führer dying in the ruins of his chancellery.

Stalin died in 1953 of a stroke, or perhaps of poisoning by his secret police chief, Lavrentiy Beria. Ribbentrop was executed after trial by the Nuremburg tribunal, having been convicted for his role in promoting aggressive war and unleashing the Holocaust. Molotov lost influence after Stalin’s death but lived until 1986, when he died at the age of 96. He remained an unrepentant Stalinist to the end. Only in 1989 did Moscow admit the existence of the secret protocol; President Vladimir Putin later condemned the agreement as “immoral.”

There almost certainly would have been widespread war without the Hitler-Stalin Pact. But the character of the conflict would have been radically different. Had the German dictator proceeded to invade Poland, followed by an attack on the USSR, the Wehrmacht would have been far less prepared for extensive operations. So would the Red Army, and there would have been no American Lend-Lease program, which effectively mechanized the Soviet military. Berlin, however, would not have been able to call on significant contingents of Hungarians, Italians, and Romanians for aid. Rather than do nothing during the infamous Sitzkrieg after declaring war on Germany, Britain and France might have launched an offensive while German troops were tied down in faraway Russia.

A strike westward without safeguarding Germany’s eastern border would have been far riskier for the Reich than the conflict’s actual course. Poland might have attacked to support its allies. Moscow probably would have stayed neutral while accelerating its armaments production. But the USSR might have taken a more active role in the conflict: without a non-aggression pact, the Soviet Union would be the obvious next target for a Germany victorious in the West. But any succeeding attempt at the conquest of the Soviet Union by Berlin would have been without advanced positions in the east and the advantage of surprise when striking. America’s involvement might have remained much the same, dedicated to saving Britain and defeating Germany — and aiding Russia if the latter was attacked.

In short, there have been few treaties with consequences as great as the Hitler-Stalin Pact. It simultaneously emboldened the Third Reich, weakened the Allies, and anesthetized the Soviets. The agreement might not have changed the course of the war, but probably lengthened it while increasing the casualty toll. Perhaps the gravest humanitarian consequence was the expansion of the Holocaust. The treaty gave Germany easier access to countries with large Jewish populations and space within these countries for death camps.

Finally, the dictators’ partnership helped transform the map of Europe. If Berlin had not abandoned friendly states along Russia’s border, the Soviet Union might not have swallowed the Baltics and chopped off pieces of Finland, Poland, and Romania. Perhaps Poland would have avoided defeat, ultimately being allied with rather than a victim of the USSR.

Yet this malign “deal of the century” was well-nigh impossible to avoid. Only very late did the Allies understand the true nature of Hitler and his regime. Soviet brutality — such as the Katyn massacre of thousands of Polish military officers — retrospectively justified Warsaw’s reluctance to admit the Red Army to fight Germany. Virtually no one imagined the success of the Wehrmacht’s Blitzkrieg, without which Stalin’s plan for sitting out the conflict might have proved prescient.

Eighty years on, the picture of Stalin, Molotov, and Ribbentrop celebrating their handiwork still offends us mentally and morally. Thankfully, that world has passed. Yet evil has not disappeared from international affairs. We should never forget the moment when two of history’s worst dictators came together to do evil, leaving immeasurable death and carnage in their wake.

Doug Bandow is a Senior Fellow at the Cato Institute. He is a former Special Assistant to President Ronald Reagan, and the author of Foreign Follies: America’s New Global Empire.