It looks like Mexico may be the next country to legalize the use of cannabis for medical purposes. The Mexican senate overwhelming approved the bill, first introduced by President Enrique Pena Nieto. It will now head to the lower house for approval before the measure becomes law.

The bill would also allow for production of marijuana for scientific and medicinal purposes – it passed 98-7. Recreational cannabis would remain illegal. The legislation echos laws passed in various US states, and could be beneficial for both countries.

Mexico has long been plagued by ruthless drug cartels, who smuggle illegal drugs into the United States and other countries – including but not limited to marijuana. Cartel-related violence has surged in recent years, with thousands of civilians killed or injured in the crossfire. Proponents of legal weed believe that taking the drug off the black market will hinder the cartels and create safer access for patients.

“It’s been years that we’ve been fighting for acknowledgment and approval and recognition of the medical and therapeutic uses of cannabis, and today we finally have something,” said Lisa Sanchez, director of drug policy for Mexico Unido Contra la Delincuencia, a group working to curb crime, in a recent interview with Reuters.

Cannabidiol, or CBD, has already been approved on a case-by-case basis in Mexico. The cannabinoid is non-psychoactive, and is often extracted from hemp. It has been touted for its medicinal qualities, particularly for those with epilepsy, arthritis, and autism. HempMeds, a California-based producer of CBD extract (and subsidiary of Medical Marijuana Inc.), was recently approved to export to Mexico, Argentina, Brazil, Paraguay, and Chile.

“Despite the terrible cartel violence, the regulatory authority in Mexico saw the potential for CBD,” said Stuart Titus, CEO of Medical Marijuana Inc., in a recent interview with LA Weekly. “Today, we remain the only legal, cannabis-based products allowed into the country.”