By Oscar Lopez, New York Times

MEXICO CITY — 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.