The birthday fiesta was in full swing at 1.30am when five SUVs pulled up outside the house. Figures spilled from the vehicles and ran towards the lights. They burst into the house and levelled AK-47s. "Kill them all!" A shouted instruction, only three words, and the slaughter began.

Gunfire and screams drowned the music. Some victims were cut down immediately, others were caught as they tried to escape. By the time the killers left there were 17 corpses, 18 wounded and 200 shell casings. Among the dead was the birthday guest of honour, a man local media named only as Mota, Mexican slang for marijuana.

The atrocity last month in Torreón, an industrial city in the northern state of Coahuila, came amid headlines shocking even by the standards of Mexico's drug war. A sophisticated car bomb of a type never before seen in the country; a popular gubernatorial candidate gunned down in the highest-level political murder; and then last week the release of official figures putting the number of drug war-related murders at 28,000.

It was against this backdrop of bloody crisis that President Felipe Calderón said something which could, maybe, begin to change everything. He called for a debate on the legalisation of drugs. "It is a fundamental debate," he said. "You have to analyse carefully the pros and cons and key arguments on both sides."

A statement of the obvious, but coming from Calderón it was remarkable. This is the president who declared war on drug cartels in late 2006, deployed the army, militarised the city of Juárez and promised victory even as the savagery overtook Iraq's. Calderón stressed that he personally still opposed legalisation, but his willingness to debate the idea was, for some, a resounding crack in the international drug policy edifice.

"This is a big step forward in putting an end to the war," said Norm Stamper, a former Seattle chief of police and now spokesman for the group Law Enforcement Against Prohibition (Leap).

Richard Nixon launched the war on drugs on 17 June 1971, a hard-line prohibition policy continued by successive US presidents. Four decades later there is growing momentum in the US and Latin America to abandon the fight and legalise drugs, or at least marijuana. There have been false dawns before but many activists say the latest rays of sunlight are real.

In November, California will vote on a plan – called Proposition 19 – to allow adults to possess small amounts of marijuana and let local governments tax its sale. Last week a cross-political lobby group encompassing Tea Party libertarians and leftwing liberals founded a new organisation, Just Say Now, to support similar legalisation across the US.

"We should give the [individual US] states the ability to regulate marijuana just like alcohol," said Aaron Houston, co-director of the campaign. "This is an idea whose time has come."

Three factors are driving the momentum. Baby boomers who smoked pot in their youth do not share previous generations' fear of the demon weed. Economic crises have squeezed law enforcement budgets and prompted states to seek fresh revenue sources. And Mexico's horror show of shootings, beheadings and mayhem shows what happens when a rhetorical war turns all too real.

A policy proposal long confined to radical fringes became mainstream last year when three former Latin American presidents – César Gaviria of Colombia, Fernando Cardoso of Brazil and Ernesto Zedillo of Mexico – urged governments to legalise marijuana to squeeze cartel profits. Influential thinktank the Brookings Institution backed the call.

Last August, Argentina's supreme court ruled it was unconstitutional to punish people for using marijuana for personal consumption, giving the government a green light for further liberalisation. "Each adult is free to make lifestyle decisions without the intervention of the state," said the court. That month Mexico made it no longer an offence – but stopped short of declaring it legal – to possess 0.5g of cocaine (equivalent to about four lines), 5g of marijuana (about four joints), 50mg of heroin and 40mg of methamphetamine.

Maria Lucia Karam, a Brazilian former judge turned liberalisation advocate, said Calderón's statement showed that policymakers were recognising the failure of prohibition. "I certainly have to be very optimistic," she said. "Ending drug prohibition is the only way to reduce violence in Latin America and elsewhere." Judges across the region were growing bolder in challenging "unconstitutionalities" in current drug laws, she said.

Not all are convinced that Mexico's president, a conservative who has staked his rule on the drug war, is serious about reassessing strategy. His call for debate, made during round-table talks with security experts, business leaders and civic groups, may have been a tactical attempt to deflect headlines that 28,000 – a big jump on previous official estimates – had died in the past four years.

The logic behind legalisation is that marijuana accounts for about 60% of the $40-$60bn annual drug trade. Make it legal, goes the argument, and the cartels will lose most of their business while states gain tax revenue and shed the burden of jailing non-violent pot users.

The policy would not lead to a "garden of Eden", said Walter McKay, a Canadian former police officer who works with the Mexico City-based Institute for Security and Democracy. Cartels would adapt and continue making profits from cocaine, heroin, kidnapping and extortion. "But you would hurt their revenue stream, which would mean less money to corrupt police and politicians." However reluctantly, governments were being forced to confront the failures of prohibition, said McKay. "We're moving forward. In my lifetime I think we'll see prohibition dismantled or at least softened."

A report by Edgardo Buscaglia, a law professor and UN drug policy adviser, found that since Calderón declared war on the cartels their power and influence had increased massively, largely because they had been forced to become smarter and more brutal. Buscaglia thinks legalising drugs would be good policy but no panacea.

Proponents of prohibition say there is at least one success story: Colombia. A decade ago it was overrun by cocaine-trafficking guerrillas and paramilitaries. Today, after $1.3bn of mostly military US aid, the state has recovered territory and authority and jailed top drug lords. Could Afghanistan and Mexico follow suit?

Sceptics pray they will not. In a recent report called Don't Call it a Model the Washington Office on Latin America thinktank said narco-trafficking continued to flourish in Colombia, and that its security gains were "partial, possibly reversible and weighed down by collateral damage".

Latin America's drift away from a US-led drug war stems partly from Colombia and Mexico's suffering and partly from growing boldness in challenging the gringo superpower. Bolivia and Venezuela have led the way by expelling US Drug Enforcement Administration officials. As a result, say US diplomats, drug trafficking has surged.

But now some US states seem to be joining the revolt, saying prohibition of marijuana has failed just as miserably as the attempt to ban alcohol in the 1920s and has given a similar boost to organised crime.

Public opinion over California's Proposition 19 is split. Some surveys show voters narrowly in favour; others show them against. But the mere fact of the ballot's existence is an astonishing victory for legalisation advocates.

They have compared the ban on cannabis to the ban on alcohol in the 1920s, an experiment which gifted power and fortune to Al Capone and other mobsters. Prohibiting drugs has failed to prevent their use and social harm and fuelled narco-gang violence. "It has simply not worked," said Houston, of the Just Say Now campaign. "We tried to ban drugs and it has failed."

His solution is to treat cannabis like booze: legal and taxable. Legalising marijuana will slash cartel profits while providing annual savings and taxes of $43bn a year to the US economy. "And frankly, that's at the low end," Houston said.

Marijuana is already practically legal in many parts of the US. Using it for medical purposes in some form is now allowed in 14 states and Washington DC. Again, California has taken the lead. The city of Oakland is set to license four industrial-sized marijuana farms in January that will institute commercial-size cannabis growing alongside its already booming small-scale sector.

The attraction for the poor city is clear: one of the farms alone is estimated to generate $3m in tax revenue and create 400 jobs.

The California Democratic party has stayed neutral while numerous bodies from city governments to police groups to politicians have mobilised against the November ballot. An influential group of Californian police officers, the Orange County Coalition of Police and Sheriffs, also came out against the move last week, saying that it would hurt law and order. "[It] allows for a free-for-all at the local level and will be another burden on law enforcement," said Joe Perez, the group's chairman.

Resistance is even stronger outside California. Few people are realistically looking at measures to legalise hard drugs such as cocaine or heroin. America is still having enough trouble getting used to the idea of accepting marijuana as part of the legal landscape. No one thinks other drugs will follow quickly behind, if ever.

Tom Rosales, the leader of No On Prop 19, which opposes legalisation, called the formation of the Just Say Now group "tasteless". Its name, he claimed, is a taunting nod to the 1980s anti-drug slogan associated with Nancy Reagan, Just Say No. But supporters of Proposition 19 would say that the prohibition policy has its own brutal, three-word epithet. Kill them all.