The war on drugs is a failed policy that has injured far more people than it has protected. Around 14,000 people have died in Mexico's drug wars since the end of 2006, more than 1,000 of them in the first three months of this year. Beyond the overflowing morgues in Mexican border towns, there are uncounted numbers who have been maimed, traumatised or displaced. From Liverpool to Moscow, Tokyo to Detroit, a punitive regime of prohibition has turned streets into battlefields, while drug use has remained embedded in the way we live. The anti-drug crusade will go down as among the greatest follies of modern times.

A decade or so ago, it could be argued that the evidence was not yet in on drugs. No one has ever believed illegal drug use could be eliminated, but there was a defensible view that prohibition could prevent more harm than it caused. Drug use is not a private act without consequences for others; even when legal, it incurs medical and other costs to society. A society that adopted an attitude of laissez-faire towards the drug habits of its citizens could find itself with higher numbers of users. There could be a risk of social abandonment, with those in poor communities being left to their fates.

These dangers have not disappeared, but the fact is that the costs of drug prohibition now far outweigh any possible benefits the policy may bring. It is time for a radical shift in policy. Full-scale legalisation, with the state intervening chiefly to regulate quality and provide education on the risks of drug use and care for those who have problems with the drugs they use, should now shape the agenda of drug law reform.

In rich societies like Britain, the US and continental Europe, the drug war has inflicted multiple harms. Since the inevitable result is to raise the price of a serious drug habit beyond what many can afford, penalising use drives otherwise law-abiding people into the criminal economy. As well as criminalising users, prohibition exposes them to major health risks. Illegal drugs can't easily be tested for quality and toxicity and overdosing are constant risks. Where the drugs are injected, there is the danger of hepatitis and HIV being transmitted. Again, criminalising some drugs while allowing a free market in others distracts attention from those that are legal and harmful, such as alcohol.

While it is certainly possible that legalisation could see more people take drugs, a drug user's life would be much safer and healthier than at present. There is no room for speculation here, for we know that a great many users lived highly productive lives before drugs were banned. Until the First World War, when they were introduced under the banner of national security, there were few controls on drugs in the UK or America. Cocaine, morphine and heroin could be bought at the local chemist. Many were users, including William Gladstone, who liked to take a drop of laudanum (an alcoholic tincture of opium) in his coffee before making speeches. Some users had problems, but none had to contend with the inflated prices, health risks and threat of jail faced by users today.

Though politicians like to pretend they embody a moral consensus, there is none on the morality of drug use. Barack Obama has admitted to taking cocaine, while David Cameron refuses to answer the question. Neither has suffered any significant political fall-out. Everyone knows drug use was commonplace in the generation from which these politicians come and no one is fussed. What is more bothersome is that the tacit admission by these leaders that drug use is a normal part of life goes with unwavering support for the failed policy of prohibition.

Producing and distributing illegal drugs is a highly organised business, whose effects are felt throughout society. The extreme profits that are reaped corrupt institutions and wreck lives. Dealing drugs can seem a glamorous career to young people in desolate inner cities, even as it socialises them into a gang culture in which violence is normal. The Hobbesian environment of anarchic street gangs, crooked politicians and put-upon, occasionally corrupt cops portrayed in The Wire may not be immediately recognisable in most European countries. But it is not all that far away.

It is in the world's poorer societies that drug prohibition is having its most catastrophic effects. Mexico is only one of several Latin American countries where the anti-drug crusade has escalated into something like low-intensity warfare, while elsewhere in the world some states have been more or less wholly captured by drug money. Narco-states are one of the drug war's worst side-effects, with small countries like Guinea-Bissau in West Africa being hijacked (as Ed Vulliamy and Grant Ferrett reported in these pages in March of last year) to serve as distribution points for Latin American cocaine. Narco-capitalism is one of the less advertised features of globalisation, but it may well emerge strengthened from the recent dislocation in global markets.

Not only in Afghanistan but throughout the world, the extreme profits of the drug trade have a well-documented role in funding terrorist networks and so threaten advanced countries. No doubt terrorism will remain a threat whatever drug regime is in place, but the collapse in prices that would follow legalisation would make a big dent in the resources it can command. It is hard to see how the countries where most drug users live can be secure while counter-terrorist operations are mixed up with the ritual combat of the anti-drugs crusade.

What is required is not a libertarian utopia in which the state retreats from any concern about personal conduct, but a coolly utilitarian assessment of the costs and benefits of different methods of intervention. The scale of the problem suggests that decriminalising personal use is not enough. The whole chain of production and distribution needs to be brought out of the shadows and regulated. Different drugs may need different types of regulation and legalisation may work best if it operated somewhat differently in different countries. At this point, these details are not of overriding importance.

The urgent need is for a shift in thinking. There are hopeful signs of this happening in some of the emerging countries, such as Argentina, Mexico and Brazil (whose former president Fernando Henrique Cardoso last week argued forcefully in this newspaper that the war on drugs has failed). There is no reason why these countries, which bear much of the brunt of the drug wars, should wait for an outbreak of reason among politicians in rich countries. They should abandon prohibition as soon as they can.

It remains the case that without a change of mind in the leaders of rich countries, above all in the United States, the futile global crusade will continue. The likelihood that the American political classes will call a halt any time soon must be close to zero. Yet it is pleasant to dream that President Obama, in the midst of all the other dilemmas he is facing, may one day ask himself whether America or the world can any longer afford the absurd war on drugs.

John Gray's latest book is Gray's Anatomy: Selected Writings (Allen Lane/Penguin Books).