The pungent smell of marijuana smoke drifted through the air outside Mexico’s Supreme Court as legalization activists puffed and waited for judges to make their ruling. When it came, it sparked up cheers and more joints. Four out of five Supreme Court justices had voted in favor of a lawsuit by plaintiffs who argued that it was unconstitutional to stop them growing, possessing or consuming cannabis. The ruling only applies to the plaintiffs – four activists from a cannabis club called the Mexican Society for Responsible and Tolerant Personal Use, or SMART. But it sets a powerful precedent that could shake up drug laws in Mexico and across the region.

“As a country, we are taking a first step, a step that recognizes this important human right, which is dignity and liberty,” Fabian Aguinaco, a lawyer for SMART, told TIME. Aguinaco said that the precedent could lead to others making similar claims and eventually to an overturning of Mexico’s laws that prohibit drug use. “This is like when you make a hole in a well. All the water pours out. But we need to construct public policies to regulate [drug use] and also satisfy people’s liberty.”

Changing policy on narcotics has a particular significance in Mexico, which has suffered from one of the worst drug wars in world history. Cartels and the security forces fighting them killed more than 83,000 people between 2007 and 2014 according to a government count, with some independent analysts producing even higher casualty estimates. Mexico is also the biggest narcotics supplier to American users, according to the Drug Enforcement Administration. “The most significant drug trafficking organizations operating in the United States today are the dangerous and highly sophisticated Mexican transnational criminal organizations (TCOs) that continue to be the principal suppliers of cocaine, heroin, methamphetamine, and marijuana,” the DEA’s acting head Chuck Rosenberg said in the a letter published Wednesday, alongside an annual national drug threat assessment report.

The latest Supreme Court ruling will not directly affect Mexico’s drug trafficking cartels because it only allows the plaintiffs to grow and possess marijuana for their personal use. However, shifting drug policy could alter the nature of the market in the long term, changing the way cartels do business. Following the votes to legalize marijuana in Washington State and Colorado in 2012, Mexican traffickers appeared to be smuggling less marijuana northward. The U.S. Border Patrol has been seizing steadily smaller quantities of the drug, from 2.5 million pounds in 2011 to 1.9 million pounds in 2014.

Some reformers, including former Mexican President Vicente Fox, have argued for a wider legalization of drugs to stop cartel violence. When the court decision was announced on Wednesday, activists outside broke into a chant of “mota si, guerra no,” or “weed, yes, war, no.” “This a positive step that has very wide implications,” said Sanho Tree, director of the Drug Policy Project at Washington’s Institute of Policy Studies. “There is a ripple effect of changing drug laws across the region. People are seeing that blanket drug prohibition has painful effects and doesn’t work.”

After former president Richard Nixon declared the “war on dugs” in 1971, Washington pressured Latin American nations to clamp down on opium, coca and marijuana crops with aerial spraying and military operations. The region largely continued with this prohibitionist approach into the 21st century.

However, adherence to an all-out drug war has shown growing cracks in recent years. In 2009, both Mexico and Argentina passed laws that decriminalized possession of small amounts of several drugs; the narcotics were still illegal but those found with the drugs would be sent to rehab centers, rather than fined or imprisoned. In 2013, Uruguay became the first country in the world to completely legalize marijuana. Several acting presidents, such as Colombia’s Juan Manuel Santos, have become keen drug policy reformers. “A comprehensive drug policy involves promoting a culture of legality that allows us to overcome the ‘anything goes,’ the cult of mafia and violence that has stimulated drug trafficking in many countries,” Santos said in May.

Mexican President Enrique Pena Nieto has adopted a more conservative approach. “Personally, I’m against legalization; I don’t think it’s the [right] route,” Pena Nieto told TIME in 2012, shortly before assuming the presidency. “But I am in favor of a hemispheric debate on the effectiveness of the drug-war route we’re on now.” In the run up to the Supreme Court vote, his secretaries of both education and health argued against marijuana legalization, but said they would respect the court’s decision.

The four Mexican judges voting in favor of the ruling argued that the case was a question of individual liberties, and made little mention of the narco-related bloodshed on Mexican streets. “The absolute prohibition is excessive and does not protect the rights of health,” Justice Olga Sanchez said. “Consumption for recreational purposes should be authorized to respect personal liberties.”

As well as clashing with the Mexican federal government, the court’s decision goes against U.N. drug treaties, which require signatory countries to crack down on marijuana and other substances. However, the U.N. has already turned a blind eye on the U.S. states and Uruguay legalizing cannabis. Nations will also have a chance to rethink the U.N.’s drug policy at a special session in April.

The changing mood in the U.N. toward away from prohibition was shown last month by a leaked document from the United Nations Office on Drugs and Crime (UNODC), which called for countries to consider decriminalizing drugs for personal use. However, the UNODC refrained from backing the paper. “These bureaucracies die hard,” says Tree, of the Drug Policy Project. “The UNODC is having an existential a crisis. It is not going out quietly.”

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.