Democracy is not the natural condition of the world. The ambiguous examples of Athens and Rome still shine dimly from the past; but democracy as a sustained, widespread phenomenon is something new.
A hundred years ago, no more than a handful of states were democratic. By today's standards, most of these were highly imperfect. Women did not vote anywhere; property qualifications still existed; in the United States, black Americans were not fully enfranchised until late in the 20th century. As we embark on projects to spread democracy more widely, a cause that is important for the welfare of many people abroad - as it is, in the long run, for our security at home - we ought to be aware how shallow are the roots of democracy and how difficult the conditions for it may be.
One way to understand the conditions for democracy is to try thinking how it might be lost. In Britain, our last successful coup was in 1688. Today, it would be less easy to organise a military takeover in the classical manner. The army could seize the cabinet and the opposition, but thereafter the problems would begin. Once, it would have been enough to capture a few newspaper editors and trade unionists. But potential focuses for opposition are now more various: presenters from TV and radio, prominent businessmen, pop stars, models and other celebrities would all be capable of rallying dissent. And whereas, a hundred years ago, the army could target a few major railway stations and the main broadcasters, there are now too many airports, motorways, satellite channels, cellphone operators, internet service providers. At home, the complexity of society is itself a defence against a military takeover; abroad, it would lead to isolation and to extra costs as membership of the EU and Nato were suspended or cancelled.
But the biggest reason why we do not have military coups in Britain is much simpler: the army would not do it and no one would dare suggest that it should even think of such a thing.
The critical moment in a country's evolution towards democracy comes exactly at the point when the army decides that intervening in politics is no longer one of the things it does. Sometimes you can even see the moment. In Moscow, in 1991, it came (perhaps) when the soldiers decided not to shoot the women who surrounded their tanks. In Georgia, only a few months ago, soldiers who had been ordered to shoot demonstrators chose instead to fire over their heads. Whether this represents a permanent choice depends on Georgia's acquiring a state that is accepted as legitimate - it was in the hope that such a state might be achieved that the soldiers acted as they did. In Thailand in 1999, an attempted coup was laughed off, suggesting a permanent change. In Spain, it was the king who ended the nonsense. Or at least it was the decision of the king to reject the attempted coup, which made it afterwards seem to have been nonsense. It is at this moment - when the idea of a coup becomes a joke - that you know that democracy has won. Democracy has then entered the canon of the unwritten rules which govern our lives at the deepest level.
That is a state greatly to be wished for, where the unwritten rule is stronger than the written. Written laws can be changed, abused or torn up - "constitutions are made of paper; bayonets are made of steel", as they say in Haiti (and they ought to know) - but unwritten laws cannot be torn up. They live inside each member of a community. Indeed, acceptance of the unwritten rules is one mark of belonging to the community.
The danger to an established democracy such as Britain comes not from a classical military coup, but from a legal coup where the letter of the law is preserved but the spirit of the law, the unwritten part, is violated. This is how Hitler came to power: all the constitutional forms were followed - and Weimar was by no means a bad constitution - but the result was a tyranny. Arguably, the same thing happened with Mussolini and the military governments of Japan in the 1930s.
In Britain, such a constitutional coup would be comparatively easy; a short bill to prolong parliament indefinitely would be a good start. However, no constitutional complexities or entrenched provisions would save any country that was set on such a course: the crowds in the street insisting on change, the widespread fear of a common threat to the nation, the need for a strong man to deal with the crisis, and the great simplification of politics, would all make it seem unpatriotic to show opposition.
What can save a country is its people. Democratic systems survive in times of crisis if enough people are willing to resist such pressures. In more ordinary times, what is needed is enough people who are unwilling to subvert the law: civil servants who do not take bribes, lawyers who do not bend to political pressure, journalists who report objectively, generals who stay out of politics, politicians who accept the verdict of the electorate. Accepting the verdict of the Supreme Court over the hanging chads of Florida, even when you neither like nor agree with it, is what makes democracy stick.
A country can have the finest constitution in the world, with the most elaborate safeguards for human rights and the rule of law, but none of it will mean anything unless those concerned mean to make it a reality. Many tyrannies in the former communist bloc did, in fact, have admirable written constitutions but they were all subverted by the supremacy of the Communist party. (Curiously, as the party lost its authority, the dead letter of the law often came back to life and sometimes was the starting point for transition.) Many former colonies also were left with admirable constitutions that have, over years, been undermined by politicians who treated the state as their private property and by citizens who let them get away with it.
Good laws and good constitutions can help - indeed, bad constitutions can be the ruin of a state - but what keeps democracy going is the unwritten laws and the great chain of people who, often unconsciously, put the system above their own profit or position, and who work on the basis that, in a democracy, there are things that are just not done. Our real values are not the ones we write in grand declarations, but the ones we do not even need to think about. The human chain of two million people which linked Vilnius to Riga in 1989 might be a helpful way of visualising the foundation of democratic states that rest ultimately on the convictions and self-restraint of ordinary people. Montesquieu had something like this in mind when he said that the citizens of a democracy needed to be more virtuous than those of a monarchy.
The point is this: democracy is as much a social phenomenon as a political one. That is what the Swiss historian Jacob Burckhardt was getting at when he wrote: "Like bad physicians, they thought to cure the disease by removing the symptoms, and fancied that if the tyrant were put to death, freedom would follow of itself." The tyrant is the symptom; but the disease itself is in the society that has not found its way to the complicated compromises and unwritten understandings necessary to make democracy work.
All of this makes the export of democracy as a packaged system difficult, and in some cases impossible. The hardware of laws, constitutions and armies can be explained and established with benign foreign help, but the software of unwritten rules has to be developed, invented or copied locally. Even where people want democracy, they may not be able to achieve it. They may not want it enough to sacrifice their loyalty to family or tribe, or their dream of a socialist/free-market/godly state to a process in which not everybody gets what they want. Or they may not even understand what it is that they have to give up to get it. In any number of countries, you can find a majority in favour of democracy - by which they mean that they want a state where they can get their way. But the question is whether people will support democracy when it means that someone else is going to get theirs.
That is not a reason for giving up the idea of trying to export democratic ideas. The theory that "Russia will never become democratic because it has no democratic tradition" is nonsense: if this were true, no country would ever become democratic. But it is probably easier to become a democracy if you have some folk memory of a democratic past. This was the main reason for the success of "nation-building" after the Second World War: Germany had had a long democratic tradition, Japan a shorter one, both of which had gone wrong under external and internal pressures in the 1930s. That is a good reason also for trying in countries such as Iraq. Even if it does not work this time around, the experience of failure may contribute to success later on. The unwritten compromises and understandings are made not by foreigners, but by the people themselves; and usually they have to evolve through a process of trial and error.
There are not many examples of democracy being imposed by military force. The overthrow of despots is an essential condition of democracy; foreign armies are often the instrument for this. Military defeat frequently leads to regime change. This is especially true for military dictators. When they are defeated, they lose not only prestige but also the means of coercion that has maintained them in power. Their weakness is likely to be fatal. (The mistake in 1991 was to leave too much of Saddam Hussein's Republican Guard intact.)
What happens after the fall of a dictator is up to fortune and the people. In Russia in 1917, defeat led to revolution and then to dictatorship. In Argentina, after the defeat in the Falklands, the revolution was democratic - having a folk memory of democracy helped. (This was followed by a democratic domino effect in South America.) In Yugoslavia, a half-defeat was followed by a half-revolution.
In none of these cases did occupying forces play a role. In Germany and Japan, after the Second World War, they helped establish an environment in which democratic traditions could revive. In Japan, General MacArthur's radical land reform was important in creating a new social environment. In Cuba, Haiti and the Philippines, the outcome of US occupation was more mixed. In Bosnia and Kosovo, the story is not yet over. Haiti is an interesting case not just because there have been so many attempts and failures, but because of Franklin D Roosevelt's comment: "The facts are that I wrote Haiti's constitution myself and, if I do say so, I think it's a pretty good constitution." In fact, he almost certainly did not write it. However, his later fierce opposition to imperialism is in marked contrast. Perhaps his experience of Haiti and the failure even of good constitutions to bring democracy had something to do with it.
It is not surprising that military occupation is not the royal road to democracy and the rule of law. Government by unelected foreigners who have acceded to power by force is the reverse of democratic. The use of force to impose order, involving detention without trial and other abnormal, though often necessary, measures is the reverse of the rule of law. The most benevolent occupier therefore finds that they are obliged to operate on the principle of "Do as I say and not as I do", which is usually the least convincing way to convert people.
The most striking cases of revolutions leading to democracy are those in central Europe in 1989, following the collapse of Soviet power. These revolutions were linked to the withdrawal of forces, rather than to occupation; but the ease with which democracy was established is astonishing. Perhaps this experience helped persuade some in the US that the overthrow of tyrants was sufficient for a country to become democratic, leading to the over-optimism in the case of Iraq. (The history of the US, which alone among nations was born democratic, is another reason why Americans often assume that democracy is easy.)
Memories of their rather short-lived democratic pasts may have helped in countries such as Poland or the Czech Republic. But there was a second powerful force at work: the democratic environment of western Europe. When many of the central European states were first created, in the interwar years, the environment was one of shaky democracy threatened by communism and deteriorating into fascism. In 1989, the ambition of central European countries escaping from the grip of the Soviet Union was to join the community of states in Europe. This had now become solidly democratic. Democratic ideas were exported softly by the Organisation for Security and Co-operation in Europe, and with rather more rigour by the Council of Europe, Nato and the European Union. In some cases, pressure was applied but, in most cases, the importers were as enthusiastic as those offering the product. Norms and unwritten rules can be regional as well as national: the idea that "this is not how things are done in Europe" can also have an influence.
A community of democracies, especially one cemented by common institutions, offers powerful incentives to conform to the spirit of the laws.
Robert Cooper works for Javier Solana, the EU foreign policy chief, but these are his own views. His The Breaking of Nations: order and chaos in the 21st century, published by Atlantic Books last year, won the Orwell Prize for political writing