With its shadowy John le Carré atmosphere, communist eastern Europe was a melancholy place in the late 1980s. The Estonian capital of Tallinn typically teemed with Russian money-changers (“Comrade, we do deal?”) and prostitutes from Uzbekistan and other parts of Islamic central Asia. The television in my hotel room was detuned from Finnish to Soviet channels but I was able to pick up Dallas or Miami Vice from across the Gulf of Finland. Guests were forbidden to visit the 21st floor, which officially did not exist. KGB officers (it is now known) had a room up there where they monitored Helsinki radio waves and the hotel’s 60-odd bugged rooms. Perhaps it is no coincidence that the matchbox-sized Minox camera had been invented in Tallinn (by one Walter Zapp, in 1936): it was a favourite with cold war spies.

As Odd Arne Westad relates in The Cold War: A World History, Estonia was a display case for Mikhail Gorbachev’s long-held plan to transform the monolithic face of communism and east-west tensions. In the last days of the cold war, the Russian leader made much of the “Estonian model”, by which individuals were allowed to make profits at work but without surrendering (too much) to capitalist enterprise. Ahead of the game, Tallinn instituted a number of self-financing co-operatives ranging from a public lavatory (where you could relieve yourself for 20 kopeks) to a pie-shop selling cheburechnaya Tatar meat pasties. The singular world of the cold war meant that one half of Europe was dining out expensively, while the other half was standing in queues for meat pasties.

In November 1989, however, the Berlin Wall was breached and Soviet authority began to unravel. On Christmas Day that historic year, the Romanian communist dictator Nicolae Ceaușescu and his wife, Elena, were executed by a military firing squad. By the time the Baltic states of Estonia, Latvia and Lithuania petitioned for independence soon after, the Soviet Union was on the brink of collapse; in 1991 the Russian president Boris Yeltsin (reportedly fired up by vodka) officially put paid to the USSR’s existence when he outlawed the Communist party within Russia. Considering the magnitude of what happened, surprisingly few people died in the twilight months of the cold war.

Westad, the Norwegian-born scholar who heads US-Asia Relations at Harvard University, reminds us that the term “cold war” was coined by George Orwell in 1945 to denote capitalist-socialist antagonisms between the United States and the USSR after the defeat of Nazi Germany. It is often asked how a cold war was possible when Stalin and Franklin Roosevelt had been such strong allies in the second world war, yet their alliance was entirely opportunist.

Until 1941, when Hitler decided to attack the Soviet Union, Nazi Germany (not the US) was communist Russia’s chief ally. A secret protocol in the 1939 Nazi-Soviet Non-Aggression Pact had left Stalin free to annex Estonia, Latvia, western Lithuania and eastern Poland, while Hitler was able to overrun western Poland. Beyond their ideological differences, Hitler and Stalin were united in their determination to carve up the Baltic states and Poland between themselves. In many ways, Westad suggests, Hitler was the only person Stalin ever trusted. He distrusted Trotsky, his former allies Zinoviev and Bukharin, the politburo, his generals and even his own family. Yet in the Führer the great vozhd (“Boss”, as Westad calls Stalin) placed a rare confidence. Intelligence reports had reached Stalin about Hitler’s impending invasion, yet he chose to ignore them. At its peak between 1945 and 1989, the cold war was born of these geopolitical complexities and miscalculated allegiances.

In well-researched if occasionally bland-sounding pages (“The world had changed tremendously in the 1970s and early 1980s, and in the late 1980s it changed even more”), Westad chronicles US-Soviet strategic competition in the south-east Asian theatre and in the building of the Berlin Wall in 1961. In many ways, the cold war was a continuation of the old European colonial enterprise and the bankrupt imperialisms of the western powers, Westad argues. An important facet of the cold war was Russia’s competition with America into space. In 1961 the Soviets stole a march on their rivals when Yuri Gagarin became the first man to break the bonds of the Earth’s gravity. Notably, both the US and the USSR co-opted ex-Nazi German ballistics experts to engineer their space programmes. Distinctions between the ideological left and right were not always obvious in the cold war.

Today, western attempts to contain radical Islamism continue an us-and-them mentality. Angry Muslims decry the perceived depredations of US imperialism and the infidel free market; the threat posed by suicide bombers makes the old east-west rivalries look almost manageable by comparison. Westad’s huge, single-volume history is the beginning of wisdom in these things.

• The Cold War by Odd Arne Westad is published by Allen Lane (£30). To order a copy for £25.50 go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99