Lawmakers in Mexico approved a bill Wednesday night to legalize recreational marijuana, a milestone for the country, which is in the throes of a drug war and could become the world’s largest cannabis market, leaving the United States between two pot-selling neighbors.

The 316-to-129 vote in Mexico’s lower house, the Chamber of Deputies, came more than two years after the Mexican Supreme Court ruled that the country’s ban on recreational marijuana was unconstitutional and more than three years after the country legalized medicinal cannabis.

The chamber approved the bill in general terms Wednesday evening before moving on to a lengthy discussion of possible revisions introduced by individual lawmakers. In its final form, though, the measure is widely expected to sail through the Senate before being sent to President Andrés Manuel López Obrador, who has signaled support for legalization.

The measure, as of Wednesday night, would allow adults to smoke marijuana and, with a permit, grow a small number of cannabis plants at home. It would also grant licenses for producers — from small farmers to commercial growers — to cultivate and sell the crop.

“Today we are in a historic moment,” said Simey Olvera, a lawmaker with the governing Morena party. “With this, the false belief that cannabis is part of Mexico’s serious public health problems is left behind.”

If enacted, Mexico would join Canada and Uruguay in a small but growing list of countries that have legalized marijuana in the Americas, adding further momentum to the legalization movement in the region. In the United States, Democrats in the Senate have also promised to scrap federal prohibition of the drug this year.

For “Mexico, given its size and its worldwide reputation for being damaged by the drug war, to take this step is enormously significant,” said John Walsh, director of drug policy for the Washington Office on Latin America, a U.S. advocacy group. “North America is heading toward legalization.”

In Mexico, however, the bill has proved divisive.

Critics say it is unlikely to make a serious dent in Mexico’s soaring rates of cartel-fueled violence, and argue that it is unwelcome in a country where nearly two-thirds of people oppose legalizing marijuana, according to recent polling.

“It’s a political fad,” said Damián Zepeda Vidales, a senator with the opposition National Action Party and one of the bill’s most vocal detractors. “It’s a matter for politicians, for an elite that’s now empowered in Congress and in government that wants to impose a way of life on society.”

Security experts agree that the law’s practical impact on violence will likely be minimal: With 15 American states having now legalized marijuana, they argue, the crop has become a relatively small part of the Mexican drug trafficking business, with cartels focusing on more profitable products like fentanyl and methamphetamines.

“We shouldn’t overestimate the power of this bill,” said Falko Ernst, senior Mexico analyst for the International Crisis Group, a global research organization. The bill will not “substantially change the dynamics and drivers of lethal conflict in Mexico.”

Proponents of legalizing marijuana contend that the bill is too limited in scope, even if it represents a symbolic breakthrough in the push to end a drug war that has cost an estimated 150,000 lives, according to the Council on Foreign Relations.

Legalization “is an important step toward building peace in a country like ours, where for at least a decade or more, we’ve been immersed in an absurd war,” said Lucía Riojas Martínez, a Mexican congresswoman who made headlines in 2019 when she gave a rolled joint to the country’s interior minister, Olga Sánchez Cordero, after delivering a speech in Congress.

“But this bill falls short of achieving that,” she added.

It is also unclear how much the law will benefit Mexico’s poor farmers, who have grown marijuana for decades and often end up in the middle of conflicts between warring drug trafficking groups.

The bill mandates that small farmers and Indigenous people be given priority in licensing, but stipulates only that these vulnerable groups can be granted more than one license.

And without additional state policies to tackle organized crime, particularly in areas where marijuana is grown, said Mr. Ernst, such well-intentioned requirements may not have a meaningful impact for farmers in the regions controlled by cartels.

“For most areas where you have these high-conflict settings,” said Mr. Ernst, there are not enough state resources to truly take on organized crime groups.

But many entrepreneurs, at least, are seeing green.

With more than 120 million people, Mexico would represent the largest marijuana market in the world by population. The crop could become big business in Mexico, a potential financial lift for an economy badly battered by the coronavirus crisis.

“It’s an excellent economic, natural, ethical and moral solution for a country in need,” said Juan Sánchez Mejorada, chief executive of Ceres Soluciones, a medicinal cannabis company.

“Doing this right could give Mexico an economic surplus,” he said.

This kind of fervor makes pro-marijuana activists nervous.

“It’s a law for the rich, and marijuana should be for everybody,” said Ivania Medina Rodríguez, 18, a local activist. “They’re going for business before rights.”

Dressed as a giant cannabis leaf, Ms. Medina was attending a protest last year that began at a small marijuana plantation outside the Senate offices in Mexico City, where locals now regularly come to smoke pot while the police turn a blind eye.

Some activists fear that the law will overly favor large corporations that could obtain what the bill terms an “integral license,” giving them access to the entire marijuana supply chain, from seed to sale, while leaving small-scale producers and vendors locked out of the lucrative market.

The bill in Mexico would allow individual users to carry up to 28 grams of marijuana and grow six cannabis plants at home. Cannabis could also be purchased by adults over 18 at authorized businesses, and grown at larger scale by licensed groups. Medical marijuana, which Mexico legalized in 2017, would be regulated separately by the health ministry, which published rules in January covering the growing and research of medicinal cannabis.

Local advocates say the restrictions on possession will limit the bill’s impact, particularly for low-income consumers, who may fall prey to extortion from the police, a regular occurrence in Mexico.

“We live in a country where corruption and extortion is the norm,” said Zara Snapp, co-founder of the RIA Institute, a Mexico-city based drug policy research and advocacy group.

Still, for many proponents in Mexico, approving the bill is a notable step in the long journey toward full legalization.

“It’s like when you’re running a marathon and you haven’t started — running the first meter helps to start the discussion,” said Mr. Sánchez, the marijuana businessman. “It means firing the starting gun, even if we still have 42 kilometers left to go.”