Uruguay's proposal to create a government controlled legal marijuana industry has made it halfway through congress, giving President Jose Mujica a long-sought victory in his effort to explore alternatives to the global war on drugs.
All 50 members of the governing Broad Front coalition approved the proposal in a party line vote just before midnight on Wednesday, keeping a narrow majority of the 96 lawmakers present after more than 13 hours of passionate debate over the issue of legalisation.
The measure will now go to the Senate, where Mr Mujica's coalition has a larger majority and the bill is expected to be passed within weeks, making Uruguay the world's first nation to create and regulate a legal marijuana market.
Once passed, the bill will allow marijuana to be sold in pharmacies to adults over the age of 18 and a registry would be created of those who purchase it to prevent users from buying more than 40 grams a month. Carrying, growing or selling marijuana without a license could bring prison terms, but licensed consumers could grow up to six plants at a time at home. Growing clubs with up to 45 members each would be encouraged to spurn enough marijuana production, driving out unlicensed dealers and drawing a line between marijuana smokers and users of harder drugs.
Uruguay would become the first country to regulate both the production and sale of the drug.
"Sometimes small countries do great things," said Ethan Nadelmann, Executive Director of the US Drug Policy Alliance. "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."
Marijuana legalisation efforts have gained momentum across the Americas in recent years as leaders witnessed the death toll rise following military responses to unabated drug trafficking in Mexico and Central America.
Presidents Juan Manuel Santos of Colombia and Otto Perez Molina of Guatemala have joined Mr Mujica to call for reforms, and a recent report by a commission of the Organization of American States encouraged new approaches such as legalisation of marijuana.
"At the heart of the Uruguayan marijuana regulation bill is a focus on improving public health and public safety," said Hannah Hetzer, a Drug Policy Alliance staffer. "Instead of closing their eyes to the problem of drug abuse and drug trafficking, Uruguay is taking an important step towards responsible regulation of an existing reality."
Legislators in the governing coalition said putting the state in charge of a legal marijuana industry could be successful as it may help prevent the global war on drugs, which has so far been both a costly and bloody failure. Supporters argue that displacing illegal dealers through licensed marijuana sales could save money and lives. They also hope to eliminate a legal contradiction in Uruguay, where it has been legal to use the drug but illegal to sell it, buy it, produce it or possess it.
However, critics warn that marijuana is a gateway drug and said cultivating the habits of addicts is playing with fire.
National Party Deputy Gerardo Amarilla said the Government was underestimating the risk of marijuana, which he called a "gateway drug" for other chemical addictions that foster violent crimes. "Ninety-eight per cent of those who are today destroying themselves with base cocaine began with marijuana," Amarilla said. "I believe that we're risking too much. I have the sensation that we're playing with fire."
Mr Mujica said that he has never consumed marijuana, but argued that regulations are necessary because many citizens in Uruguay do consume the drug, despite results from recent polls suggesting two-thirds of Uruguayans oppose the plan.
The latest proposal "has some adjustments, aimed at strengthening the educational issue and prohibiting driving under the effects of cannabis," ruling coalition deputy Sebastian Sabini said. "There will be self-growing clubs, and it will also be possible to buy marijuana in pharmacies".
An Institute for Regulation and Control of Cannabis would be created, with the power to grant licenses for all aspects of a legal industry to produce marijuana for recreational, medicinal or industrial use.
Dozens of pro-marijuana activists followed the debate from balconies overlooking the house floor, while others outside held signs demonstrating their support.
"This law consecrates a reality that already exists: The marijuana sales market has existed for a long time, but illegally, buying it from traffickers, and in having plants in your house for which you can be thrown in jail," said Camilo Collazo, a 25-year-old anthropology student. "We want to put an end to this, to clean up and normalize the situation."
The heavy toll, costs and questionable results of military responses to illegal drugs have motivated marijuana legalisation initiatives in the US states of Colorado and Washington, and inspired many world leaders to re-consider current drug laws.
The secretary-general of the Organization of American States, Jose Miguel Inzulza, told Mujica last week that his members had no objections. Pope Francis, however, said during his visit to Brazil that the "liberalisation of drugs, which is being discussed in several Latin American countries, is not what will reduce the spread of chemical substances."
Additional reporting by AP