The Uruguayan lower house of parliament passed a bill that would create the world's first legal, regulated marijuana markets Wednesday night. The bill passed on a vote of 50-46 after nearly 12 hours of debate.

"Sometimes small countries do great things," said Ethan Nadelmann, executive director of the Drug Policy Alliance (DPA). "Uruguay's bold move does more than follow in the footsteps of Colorado and Washington. It provides a model for legally regulating marijuana that other countries, and US states, will want to consider — and a precedent that will embolden others to follow in their footsteps."

Under the bill, the Uruguayan government would license producers, sellers, and consumers. Smokers would be limited to buying 40 grams a month. Unlicensed possession, cultivation, or sales would be criminal offenses, including prison time in some cases.

Registered users would be able to grow up to six plants, join a marijuana-growing collective, or purchase marijuana at a dispensary or pharmacy.

President Jose Mujica has been pushing the bill as a means of attacking black markets and organized crime by creating a legal, licensed marijuana marketplace. He first unveiled it nearly a year ago, but postponed voting at year's end to try to rally public support. A "Responsible Regulation" campaign including TV ads tried to sway the public in recent weeks, to little effect, and public opinion remained opposed to the measure.

But Mujica's Broad Front (Frente Amplio) coalition held a narrow 50-49 edge in the lower house, and parliamentary discipline prevailed. The bill will go before the upper house later this year. The Broad Front holds a bigger majority there, meaning the bill should pass if discipline continues to hold.