Mexico’s Supreme Court voted Wednesday to allow a group of activists to legally grow and smoke marijuana, marking the first loosening of drug prohibitions in the country and fueling debate about a crop that is at the center of a decade of violence.

The ruling deemed unconstitutional aspects of the national health law that prohibit marijuana use. Although the decision allows only the plaintiffs to consume the drug, activists said it sets a precedent that could accelerate efforts to pass legislation permitting recreational or medicinal use of marijuana.

“Absolute prohibition is excessive and doesn’t protect the right to health,” Justice Olga Sánchez Cordero said.

The growing debate on marijuana use is an important development for Mexico, one of the world’s biggest producers of the drug. The country has endured brutal losses during its drug waryet remained largely opposed to legalization, even as several U.S. jurisdictions have moved forward with laws allowing medicinal and recreational use of cannabis.

A supporter of marijuana legalization wears a Lucha Libre wrestling mask decorated with a marijuana leaf, as he celebrates outside the Supreme Court in Mexico City Nov. 4, 2015. (Eduardo Verdugo/AP)

Across Latin America, governments have been rejecting the Washington-driven hard line in the drug war in favor of decriminalization — a recognition that years of violent struggle have failed to stem the flow of narcotics into the United States. But Mexico has held on to its conservative drug laws despite various legalization attempts, particularly in more liberal Mexico City.

As news spread that the Supreme Court was considering the case, some prominent public officials spoke out in favor of various forms of legalization. Last week, Mayor Miguel Ángel Mancera said that Mexico City was ready for medicinal marijuana and that a favorable court decision could be the “motor” that drives the debate about marijuana in Mexico.

“In the medical part, we wouldn’t have any problem implementing it,” Mancera said. “It could work.”

The Supreme Court case involved a petition from a civic organization called the Mexican Society for Responsible and Tolerant Personal Use, known by its Spanish acronym SMART. It argued that by prohibiting the group’s members from using marijuana, the state was denying their constitutional right to self-determination. The court agreed.

The decision could generate momentum for legislative changes, said Zara Snapp, a drug policy expert in Mexico City.

“It’s a step in the right direction,” she said. “This has been about the right of a person to choose what they want to do with their bodies if it doesn’t hurt anyone else.”

Powerful forces remain opposed to such ­changes, however. The Catholic Church in Mexico came out strongly against legalization. An editorial this week in an archdiocese publication argued that the Supreme Court debate “confuses the public” about a dangerous product.

“A drug is a drug even if it’s sold as a soft medicinal balm. Bad Mexican copycats emulate the neighbor to put on the table of ‘sane democracy’ a bleak, absurd and counterproductive debate,” the editorial read. “Recreational marijuana is a placebo to ease the pain of the social destruction in which we irremediably wallow.”

The issue has gained momentum in part because of an 8-year-old girl from Monterrey. Graciela Elizalde, who has a severe form of epilepsy, recently began taking a marijuana-derived oil as treatment, becoming the first person in Mexico to receive legal authorization to consume marijuana. Her story generated a lot of media coverage in Mexico as her parents negotiated legal and bureaucratic hurdles to import and use the oil.

The Elizalde case and Wednesday’s decision show that legalization activists have found more success in the courts as opposed to Congress, where legislative proposals have failed.

“Perhaps the time has come to honestly and seriously discuss the relevance of changing from a closed and reactive model to one based on protecting the right to health,” Luis Raúl González Pérez, the ombudsman for Mexico’s National Commission on Human Rights, told an audience recently. Current drug policies “haven’t given desirable results.”

Read more:

Residents in a Mexican neighborhood miss the cartel that protected them

U.S. blocks some anti-drug funds for Mexico over human rights concerns

Mexico’s miserable year