In the Soviet Union during 70 long years of Communism, poets were like rock stars.

They filled stadiums and concert halls with adoring crowds, who came not just to be entertained, but to be lifted out of the humdrum gloom of life in the so-called workers' state. Poems and novels - and paintings and plays, of course - really mattered, both to the Kremlin rulers and to ordinary people, for very different reasons.

For Stalin, literature was a tool in the building of Communism, and writers were "engineers of the human soul". The "creative intelligentsia" enjoyed a privileged position, and many were given beautiful country houses in writers' colonies like the one at Peredelkino, in the gently rolling hills west of Moscow. In return they were expected to produce works that honoured the working classes, the building of socialism and the radiant future being devised by Stalin and his henchmen.

There were plenty of writers and artists who complied, some because they were genuinely inspired by the new society, some to enjoy the comforts and some out of sheer terror: those who stepped out of line could be arrested and executed or sent to Siberian labour camps.

The Zhivago Affair, written by a former Washington Post Moscow correspondent and a translator, is a wonderful book that brilliantly evokes this period of anguished creativity and suffering, a time when art could literally change the world. It is partly a biography of Boris Pasternak, one of Russia's greatest poets, partly the story of how he created his epic novel Doctor Zhivago, and partly - and this is the big revelation - a tale of Cold War skulduggery: of how the CIA secretly arranged for the publication of the novel and for its smuggling into the Soviet Union as a means to subvert the Communist state. Literature, it turns out, had its uses not just for the Communists but for their ideological foes in the West too.

In the West, Doctor Zhivago's story is best known from the Oscar-winning film of 1965, full of Siberian blizzards and smouldering passion. It starred Omar Sharif as the doctor-turned-poet, his life turned upside down by the Bolshevik revolution of 1917 and the ensuing civil war, and by his love for Lara, played by Julie Christie.

The novel on which it was based was completed by Pasternak in 1955, and he considered it his masterpiece. Its basic theme - the individual pitted against an overpowering and ruthless state - set him at loggerheads with the Kremlin. Pasternak had enjoyed a charmed life as a poet. While others had disappeared in the Great Terror, he survived, apparently seen by Stalin as something of a visionary.

After Stalin's death in 1953 a brief thaw under Nikita Khrushchev saw the publication of more critical literature - but Doctor Zhivago caused apoplexy in the literary bureaucracy. They regarded it as a searing indictment of the Communist revolution and as a glorification of individualism. The Kremlin tried everything to prevent its publication: it expelled Pasternak from the writers' union, and unleashed a frenzied media campaign against him. Soon almost everyone in the country knew their greatest poet had turned out to be a "traitor" - though no one was actually able to read the "disgusting anti-Soviet" book he had written.

Enter the CIA, which during the Cold War poured millions of dollars into "cultural" propaganda. The American spy agency arranged for the novel's publication (in Russian) in the West, and had it printed in miniature editions, on wafer-thin Bible-stock paper, perfect for smuggling into the USSR by tourists, students and other visitors.

At a time when the US and the USSR were menacing each other with nuclear missiles, this was the softest possible attack on Communism - testimony to the American belief the Soviet system could be undermined by chipping away relentlessly at the closed society. As a secret CIA memo put it, "this book has great propaganda value not only for its intrinsic message and thought-provoking nature, but also for the circumstances of its publication: we have the opportunity to make Soviet citizens wonder what is wrong with their government, when a fine literary work by the man acknowledged to be the greatest living Russian writer is not even available in his own country."

I have a personal anecdote that shows just how "dangerous" Doctor Zhivago was. I bought one of the miniature editions in a student bookshop in Aberdeen in the 1970s (not knowing it had been published by the CIA). On a later trip to Moscow I smuggled it in, volume one slipped into one pocket, volume two in the other, to give to a very close Russian friend. The friend was so terrified he might be discovered with it that he refused to accept my gift. I thus became probably the only person in history to have smuggled Doctor Zhivago into the Soviet Union … and back out again!