Bruno Avangera, a 40-year-old web designer from Tucumán in Argentina, pauses to relight a half-smoked joint of cannabis. Then he speaks approvingly of "progress and the right decision" by the country's seven supreme court judges, who decided last week that prosecuting people for the private consumption of small amounts of narcotics was unconstitutional.

"Last year three of my friends were caught smoking a spliff in a park and were treated like traffickers," he said. "They went to court, which took six months. One went to jail alongside murderers. The others were sent to rehab, where they were treated for an addiction they didn't have, alongside serious heroin and crack users. It was pointless and destroyed their lives."

The court's ruling was based on a case involving several men caught with joints in their pockets. As a result, judges struck down an existing law stipulating a sentence of up to two years in jail for those caught with any amount of narcotics. "Each individual adult is responsible for making decisions freely about their desired lifestyle without state interference," the ruling said. "Private conduct is allowed unless it constitutes a real danger or causes damage to property or the rights of others."

Is the "war on drugs" ending? The Argentinian ruling does not stand alone. Across Latin America and Mexico, there is a wave of drug law reform which constitutes a stark rebuff to the United States as it prepares to mark the 40th anniversary of a conflict officially declared by President Richard Nixon and fronted by his wife, Pat, in 1969.

That "war" has incarcerated an average of a million US citizens a year, as every stratum of American society demonstrates its insatiable need to get high. And it has also engulfed not only America, but the Americas.

At El Paso at the end of the month, experts from the US and Mexico will gather to take stock and thrash out alternatives. El Paso stands cheek by jowl with its twin city, Ciudad Juárez, across the Rio Grande. There, last Wednesday, the day after the Argentinian court ruling, cartel gunmen broke into the El Aliviane drug rehabilitation centre, lined 17 young people against a wall and cut them down with a fusillade of machine-gun fire. Troops last night captured the suspected killer, Jose Rodolfo Escajeda, considered one of the most brutal hitmen in Chihuahua and one of the leaders of the Juárez cartel. The executions, coming shortly after the killing of 40 people over three days in Juárez two weeks ago, take the death toll to about 1,400 this year, making it the most dangerous city in the world.

Never have the war on drugs and its flipside, the drug wars, raged so furiously as on this anniversary. Yet Mexico's is only the latest in a series of murderous conflicts that have scarred the pan-American war on drugs, starting with Operation Condor in the 1970s, whereby the US helped Mexico to obliterate poppy crops, only to give birth to the new cartels and institutionalised corruption.

Meanwhile, there have been catastrophic drug wars and narco-insurgency in Colombia, combining with political struggles to create the biggest internal displacement of people in the western hemisphere. Drug-related violence has blighted Brazil, Peru, Bolivia, Venezuela and anywhere the Mexican and Colombian cocaine cartels sought their product. Latin America has also become a factory for synthetic drugs, much of it now under Mexican control.

Latin America is seeking a different route to that of outright interdiction as advocated – and for decades directed – by Washington. The new thinking is emblematic of a new era in South American politics and statehood, in which the lexicon demands partnership with the US, not the subjugation that hallmarked the presidencies of Nixon, Reagan, the Bushes and Clinton.

Argentina's president, Cristina Fernández, has openly supported freeing up the courts of cases involving people caught with small amounts of drugs. In 2008, she said she complained that in Argentina "an addict is condemned as if he were a criminal". The government's cabinet chief, Aníbal Fernández, said the decision was a move away from "the repressive politics invented by the Nixon administration" and will offer the opportunity for the state to focus on going after major traffickers.

But a line is drawn between marijuana and hard drugs, the decision being seen as a step towards freeing resources for the battle against "paco" cocaine paste, a cheap but toxic and addictive drug that has swept through Argentina's barrios. Between 2001 and 2005, the use of paco increased by more than 200%.

Brazilian drugs campaigners see decriminalisation as a way of wresting power from heavily armed gangs. Under Brazilian law, possession of any drug is a crime, and any move to relax drug laws is likely to face fierce opposition from the Brazilian right and the Catholic church.

But "for South American countries, the 'harm' from drugs comes less from drug use than the war against producers and traffickers", said Benjamin Lessing, a University of California researcher. "The bloodshed in Mexico is grabbing headlines, but thousands of people die every year in Rio de Janeiro in clashes between police and traffickers."

Eduardo Machado, an activist from the PE Body Count group, which documents homicide levels in Recife, one of Brazil's most violent cities, said the country's war on drugs had sidelined debate over "the huge public health problem" they caused. "As long as we look at the problem of drugs in terms of repression, we will carry on failing," he said. "As long as the debate about drugs revolves around being more or less repressive, we will continue to lose thousands of young lives each year."

Even before conventional wisdom began to turn against the war on drugs, some leftwing leaders in Latin America had their own reasons to shun collaboration with the US. Not only was the policy failing, they said, but it was a pretext for Washington meddling.

Venezuela's president, Hugo Chávez, cut ties with the US Drug Enforcement Administration in 2005, accusing its agents of espionage. In Bolivia, President Evo Morales, a Chávez ally, expelled American counter-narcotic agents, also claiming they were spies. He campaigned to rehabilitate the maligned coca leaf as a sacred Inca symbol with medicinal and ceremonial properties. On one occasion, he brandished a leaf during a speech to the UN general assembly and offered coca tea to visiting dignitaries. When addressing Aymara Indians, the president is known to shout: "Long live the coca leaf, death to the Yankees!"

Bolivia's impoverished highlanders revere Morales as a fellow cocalero – coca grower – and are grateful the era of coca crackdowns and shoot-outs with US-backed drug officials is over. Morales, however, has promised zero tolerance for cocaine, which he considers a malign perversion of the coca leaf.

Ecuador's president, Rafael Correa, another leftwinger, has refused to renew the US military's lease on its base at Manta which was used for counter-narcotics operations in the Pacific. Last year the president pardoned 1,500 "mules" who had been sentenced to jail, saying they were impoverished people who had been exploited. Ecuadorean legislators have signalled they will follow Argentina in decriminalising cannabis.

Despite almost a decade of US-backed counter-insurgency operations, Colombia's cocaine output has proved remarkably resilient, a tribute to the ruthlessness and inventiveness of coca growers, guerrillas, paramilitaries and smugglers.

Peru, the second-largest cocaine exporter after Colombia, is the odd country out in South America's shift against the drug war. It has made no move towards decriminalisation and is braced for confrontation. Shining Path guerrillas, a near-extinct movement, have roared back in the past 16 months, killing soldiers and police and seizing control of coca-producing valleys.

Mexico is in a curious position: a battlefield in a drugs war that has claimed some 14,000 lives since December 2006, but also a laboratory for an experiment that goes beyond even Argentina's – opting no longer to prosecute those carrying small quantities of marijuana, cocaine, heroin or synthetic drugs.

Decriminalisation is openly aimed at redirecting stretched resources against the warmongers and opening prison space to accommodate them rather than petty addicts. Few serving Mexican politicians have tried to pretend that, without the war, the legislation would not have been considered.

In Tijuana, addicts cannot believe their luck – those arriving at the Narcóticos Anónimos session are amazed that possession of up to four lines of cocaine or 50mg of heroin will be legal. Juan Morales Magana, 17, a windscreen-washer and registered methamphetamine and heroin addict, was working out how many hits the legal limit of 40mg of meth would get him, though his counsellor, an evangelical pastor, was ambivalent: "I wouldn't want anyone to think that, just because it is legal, one should live like this for fun. Drugs are the scourge of our society. All this can do would limit killing between small-time cholos [gangsters] for street-corner turf, allowing the army to go after kingpins and middle men. The danger is that kingpins will accelerate the domestic market if possession is legal and smuggling into the US more difficult."

In barrios such as this, drugs are sold from tienditas controlled by gangs that operate an outsourced tender system for the battling cartels. "It's unsure how the legislation will affect actions against the tienditas," said police officer Elisio Montes, whose two best friends, his former boss and assistant, were murdered by executioners for the cartels.

"Personally, I sometimes wish drugs would be made legal so that the gringos can get high and we can live in peace. Then I say to myself: no – these drugs are addictive after one single hit. They're terrifying – they destroy lives, they destroy our young people. If they are legal, they will buy more."

A further reason for scepticism is the prospect of mass drugs tourism from the US. This is not what Mexican businessmen in the border town of Nogales, Sonora, had in mind last Tuesday when they discussed how to restore the image of cities that until recently enjoyed thriving trade from Americans looking for cheap pharmaceuticals, dental treatment, souvenirs, alcohol and sex.

The prospect of border towns becoming the equivalent of Amsterdam, only with cocaine and heroin freely on sale, was not discussed. "It's interesting,' said hotelier Jesus Antonio Pujol Irastorza. "I have seen a lot written about this potential problem in the US media, but almost nothing in the Mexican press."

"For a country that has experienced thousands of deaths from warring drug cartels," said San Diego police chief William Lansdowne, "it defies logic why they will pass a law that will clearly increase drug use."

The counter-voices will continue to make themselves heard. But even in the US, the discourse on drugs is changing. The prosecutor general in Baja California, Rommel Moreno, said months ago that he found it "very hard" to talk to his American counterparts "about fighting drugs with any means other than interdiction", but senses "an important shift". Officials in the border states talk about legalising marijuana for personal use, while Professor David Shirk, director of the Trans-Border Institute in San Diego, said: "I think it is inevitable that possession of marijuana will be legal in the US within a decade."

Powerful voices against prohibition will create the underlying theme at the major conference in El Paso this month and there is even a movement of police officers and law enforcement agents urging decriminalisation, unthinkable until recently. "Today, drugs are illegal, they are out of control, and they are everywhere", said Kristin Daley, projects director for Law Enforcement Against Prohibition. "If they were managed in the way that alcohol is, they would be under control. Instead of criminals getting richer, violence escalating and drug-related deaths on the rise, we would live under a system of established pricing, peaceful purchase and a regulated labelling system."

But they remain wary in Tijuana. Before the drug war, this border city was a capital of vice tourism, which has now disappeared. Tijuana lies opposite San Diego, from where most of those seeking prostitutes and other distractions came, and where a letter recently appeared in the local Union Tribune newspaper from Omar Firestone, principal cellist in the Orquesta de Baja California. He warned that the last thing the city needs is "offering sanctuary to American druggies" who will "draw the worst of our society to the streets of Tijuana and increase the flight of those seeking a better life. I guess the cartels needed a government bailout."