Vaclav Havel hated Communism with a passion, but it was the making of him. The Czech dissident-playwright turned president was a product of Prague's wealthy and cultured haute bourgeoisie, and without the Communist takeover of 1948 and all that followed he would probably have lived a life of charming bohemian privilege, a chip off the old block. But with Stalin's chosen men in Prague Castle, that was never an option: Havel and his ilk were the class enemy, and were never allowed to forget it.
His class origins barred him from further education under the Communists, and he only managed to pay his way through secondary night school by working as a lab technician. His two years of army service were as a sapper – getting young toffs to clear minefields was a useful way of eliminating them.
He was turned down by the drama school at Prague University, and only succeeded in entering his chosen profession through a side door, as a stage hand. After helping set up the small, intellectual dissident group Charter 77 in 1977, to hold the Czech government to the human rights pledges it had signed up to in the Helsinki Accords of 1975, he was repeatedly sent to prison.
But the result of all these grim experiences was that when, in a bizarre twist of history, he became the people's choice for the revolution's president, he had a far more rounded understanding of his nation's realities, and a far closer acquaintance with the people's suffering, than if he had been able to lead his life as he might have chosen. Paul Wilson, the translator of many of his plays, wrote: "Havel had always been an opponent of Communist ideology, but by the time he was arrested in the late 1970s and sentenced to four and a half years in prison, he was the leader of a small but determined human rights movement, and had articulated a revolutionary form of non-violent opposition he called 'living in truth'... Havel believed that when enough people acted in accordance with their conscience, the system would collapse. And he was right." The result was that while in his two terms as president Havel was only fitfully convincing as a politician, he carried unique authority as a moral figure. As such he was one of the few Europeans able to pronounce on the moral dimension of politics with the same sort of conviction as Nelson Mandela, Desmond Tutu, the Dalai Lama or Aung San Suu Kyi. He had been deprived of freedom for long enough to know its value.
As Communism crumbled he told his compatriots: "We have become morally ill because we are used to saying one thing and thinking another... We have learned not to believe in anything, not to care about one another. Love, friendship, mercy, humility and forgiveness lost their depth and dimension."
The man who became the hero and embodiment of Czechoslovakia's Velvet Revolution in 1989, brought his dramatist's flair to the office of the head of state: he replaced the dreary socialist realist paintings with landscapes by Czech masters, brought in a psychedelic painter to redecorate his study, and as his assistant hired a red-headed actress called Barbara Stepanova, "a busty hippie in a skin-tight purple minidress with filigreed white stockings", according to Vanity Fair.
He gave the rock musician Frank Zappa, one of his heroes, an honorary post in the Ministry of Culture and had new uniforms for the presidential guard designed by the costume designer on Milos Forman's film Amadeus. When they arrived, according to Vanity Fair, he put one on, brandished a sword and said: "Let's go scare the cooks!"
But if that makes his spell in power sound like the lunatics taking over the asylum, or the arrival of the Yippies in the White House, half a lifetime under the boot of the Stalinists ensured a far more sombre underpinning to both his work and his politics. It is impossible to imagine Franz Kafka or Samuel Beckett being called to high office, but the sudden ascent of Havel – who idolised those blackly comic modernists, and whose plays are full of echoes of their work – was scarcely less improbable.
Having worked in the theatre all his life, he confessed to feeling extreme reluctance at the prospect of becoming president. "I hesitated until the last minute," he revealed in his memoirs, entitled To the Castle and Back. "I had only a few hours to make a decision that would fundamentally change my life."
It was, he said, "the one genuine watershed in my life... You can't spend your whole life criticising something and then, when you have a chance to do it better, refuse to go near it". According to his friend Milos Forman, the two dominant traits in his character were shyness and courage, "both very extreme". Fortunately for his country it was the courage that won out.
As president he soon found himself at odds with his colleague Vaclav Klaus and the whole get-rich-quick culture that infested the new Czechoslovakia. He railed against the widespread hostility to gypsies, deplored but was unable to halt the separation of the Czech Republic from Slovakia, and apologised for the expulsion of Sudeten Germans after World War Two. Despite declining popularity he was voted in for a second presidential term, serving until 2003.
In his first address as president in 1990, he spelled out the code by which he intended to rule. "Let us teach ourselves that politics can be not just the art of the possible," he said, "... but ... the art of the impossible, namely the art of improving ourselves and the world." It was the challenge for which he will be remembered.