Culture thrives on conflict and antagonism, not social harmony - a point made rather memorably by a certain Harry Lime, says philosopher John Gray.

"In Italy, for 30 years under the Borgias, they had warfare, terror, murder and bloodshed, but they produced Michelangelo, Leonardo da Vinci and the Renaissance. In Switzerland they had brotherly love, they had 500 years of democracy and peace - and what did that produce? The cuckoo clock."

When Orson Welles spoke these lines as Harry Lime, the charismatic villain at the heart of the film The Third Man, released in 1949, Welles can't have realised how they would resonate ever after. Graham Greene, who wrote the screenplay, credited the lines to Welles, and it seems clear the actor added them when some extra dialogue was needed while the film was being shot.

The lines became lodged in the mind because they encapsulated an uncomfortable and at the same time compelling idea. His history may not have been factually accurate - the Swiss were a major military power in Renaissance times and the cuckoo clock originated some time later in Bavaria - but the idea that culture thrives in conditions of war and tyranny has an undeniable basis in fact.

We know that art can flourish under despots, but we're reluctant to admit it - if creativity and tyranny can co-exist, the value of freedom seems diminished. Welles's lines seem to express a dangerous truth, one we'd like to forget but can't banish from our minds.

Of course, Lime himself has a dangerous kind of charm. From the safe haven of the Soviet sector of Vienna, which in the aftermath of the World War II was divided into four zones, Lime is trading in diluted penicillin - a racket that leaves its victims horribly damaged.

Yet he can inspire loyalty and even love. The pulp writer Holly Martins, who arrives in Vienna looking for his childhood hero, is painfully disillusioned when he learns of his friend's crimes and finds that Lime, who was believed to have been killed in a street accident, is alive in the Soviet sector of the city.

But Lime's lover Anna never loses her loyalty to him, though she knows he planned to betray her to the Soviets as a refugee with forged papers. In the film's unforgettable last 60 seconds, she walks from Lime's second funeral, slowly passing Martins who had stayed behind to see her, without once pausing or paying him any attention.

With its images of a divided city, The Third Man is an exploration of the ambiguities and deceptions that may be required by loyalty and some of these may have entered into the making of the film. By late 1948, when the scenes of Vienna were being shot, the Iron Curtain had come down and the Cold War was well under way. For eastern Europeans, that meant 40 years of communist dictatorship.

Image caption The Third Man, set in a shadowy Vienna, was shot at the start of the Cold War

For Britain and the West, it meant getting used to the fact that an ally had become an enemy. Without Soviet resistance to the Nazi invasion, WWII might not have ended as it did, and it's not surprising that the British authorities should have acted to prevent unflattering portrayals of the Soviet Union appearing while we were still relying on its support.

In one of the most famous of these cases, George Orwell's brilliant satire Animal Farm was rejected in 1944 by the poet TS Eliot, then a director of Faber and Faber, for not being "the right point of view from which to criticise the political situation at the present time".

What is less well-known is that Orwell's masterpiece had already been turned down by the publishers Victor Gollancz and Jonathan Cape, with Cape rejecting the book on the advice of an official in Britain's wartime Ministry of Information. In a turn of events worthy of one of Greene's novels, the official was a Viennese emigre called Peter Smolka, who had earlier been recruited as a Soviet agent by Kim Philby.

In a further twist, Smolka also played a role in making The Third Man. Greene worked in the literary department of the Ministry of Information where Smolka headed the Soviet section, and they met in Vienna in the Hotel Sacher in early 1948 when Smolka showed Greene some short stories about life in the city after the war, including the trade in diluted penicillin.

Smolka earned a fee as a script consultant, and Greene left an oblique homage to his contribution to the film when he set the scene in which Holly Martins learns the truth about his friend Lime in a bar called "Smolka's".

There was another turn in the story when, in 1949, George Orwell, by then in a sanatorium and dying of tuberculosis, was asked to supply the Foreign Office with a list of communist fellow travellers whose loyalty couldn't be counted on in the event of war with the Soviet Union. Orwell duly came up with a list, which included the name of Smolka, who was described as giving "the strong impression of being some kind of Russian agent".

Orwell has been much criticised for co-operating with the British authorities in this way, but it's worth remembering that during his time fighting with the Republican forces during the Spanish Civil War, he'd seen the ruthlessness with which those who served the Soviet Union treated its enemies.

Traditional tyrants left a good deal of freedom in society

It's hard to imagine the writer feeling any qualms in giving the authorities the list. After all, he was right about Smolka, who was revealed to have been a Soviet agent only after the fall of the Soviet Union.

The years of the Cold War were filled with fear and suspicion, but not all of it was paranoia. The job of people like Smolka was to influence writers, film-makers and others to present a positive view of the Soviet Union. It's been suggested that it was Smolka who first proposed the idea of a film set in post-war Vienna to the director Alexander Korda.

However, if he aimed to influence the film he wasn't successful. Lime's lines could be interpreted as implying that the arts could flourish under Soviet repression, but while Lime was scornful of democracy, he wasn't endorsing any Soviet-style vision of the future. Lime was looking backwards in time - his point was that artistic creativity thrives on the conflicts that go with being ruled by tyrants. In contrast, the society that was supposed to be developing in the Soviet Union would be peaceful and harmonious. In that case, on Lime's view, there'd be no prospect of anything like a flourishing culture.

Image caption Michelangelo Buonarroti was an artist in troubled times

Welles was pointing to a fact that had nothing to do with the Cold War. The arts have often flourished in regimes we'd call despotic. This isn't because artists and writers do their best work when they're being persecuted - a Romantic cliche that doesn't stand up to any careful inquiry.

Culture thrives on contestation and antagonism, not some dreary fantasy of social harmony

It's because traditional tyrants left a good deal of freedom in society. Ancient China wasn't anything like a modern democracy, but it produced some of the greatest art there's ever been, while Mao's China produced nothing. Tsarist Russia contained many kinds of discrimination and injustice, but in the late 19th and early 20th Century it was in the vanguard of literature, painting, music and dance. The Soviet Union produced little that was even remotely comparable. The arts flourished in the empire of the Habsburgs, while Nazism produced Leni Riefenstahl's repugnant and much over-rated Triumph of the Will. Whereas authoritarian regimes leave much of society alone, totalitarianism aims to control everything. Invariably, the result is a cultural desert.

Culture may not need democracy or peace, but it can't develop without some measure of freedom - and that requires a diversity of centres of influence, working openly and at times in opposition to one another. Rightly, we've learnt to mistrust any directing cultural role for the state. When artists and writers rely solely on government, the result is at best nepotism and mediocrity.

But the processes through which culture is created and renewed are complex and variegated, and it's just as silly to think that a thriving cultural scene can be produced entirely by market forces. A vital culture comes from competition and rivalry between institutions - state-funded arts councils and libraries, churches and campaigning groups as well as private and corporate sponsors.

This is the kernel of truth in Harry Lime's famous lines. Culture thrives on contestation and antagonism, not some dreary fantasy of social harmony. Without such creative conflict, we really could end up with nothing but cuckoo clocks.