Uruguay came a step closer today to becoming the first country in the world to create a legal marijuana industry in an attempt to fight organised crime.

The lower house of congress voted 50-46 for the measure after 13 hours of passionate debate. The plan now goes to the senate, where passage is expected to license and regulate the production, distribution and sale of marijuana for adults.

Ruling coalition MPs argued that it was worth trying because the global war on drugs had been a costly and bloody failure.

But critics warn that marijuana is a gateway drug and that fostering the market is playing with fire.

Supporters hope to eliminate a legal contradiction in Uruguay, where it is permitted to consume pot but against the law to sell, buy, produce or possess even one marijuana plant.

The vote in the house, where the ruling Broad Front coalition had a 50-49 majority, was seen as the best chance for opponents to block the law. It next goes to the senate, where the government has a more comfortable majority.

The plan changed little in the six months after President Jose Mujica postponed voting to give supporters more time to rally public opinion. However, recent polls said two-thirds of Uruguayans remained opposed despite a "responsible regulation" campaign for the Bill.

Dozens of pro-marijuana activists followed the debate from balconies overlooking the house floor, while others outside held signs and danced to reggae music.

"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 normalise the situation."

Governing coalition deputy Sebastian Sabini said "without a doubt it would be a surprise if this proposal doesn't pass, since it's already been agreed to within all the sectors of the Broad Front".

Supporters were sweating until ruling coalition deputy Dario Perez, who was openly critical, agreed to follow his party's line that would give the government the narrowest possible majority in a vote.

Mr Mujica, for his part, said he never consumed marijuana, but that the regulations were necessary because many other people did. "Never in my life did I try it, nor do I have any idea what it is," he told the local radio station Carve.

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 rethink drug laws.

Organisation of American States Secretary-General Jose Miguel Inzulza told Mr 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".

Uruguay's government would license growers, sellers and consumers, and update a confidential registry to keep people from buying more than 40 grams a month.

Carrying, growing or selling pot without a licence 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, fostering enough marijuana production to drive out unlicensed dealers and draw a line between pot smokers and users of harder drugs.

The latest proposal "has some adjustments, aimed at strengthening the educational issue and prohibiting driving under the effects of cannabis", Mr Sabini said. "There will be self-growing clubs, and it will also be possible to buy marijuana in pharmacies" that is mass-produced by private companies.

An Institute for Regulation and Control of Cannabis would be created, with the power to grant licences for all aspects of a legal industry to produce marijuana for recreational, medicinal or industrial use.

But National Party deputy Gerardo Amarilla said the government was underestimating the risk of marijuana, which he called a "gateway drug" for other more addictive drugs that fostered violent crimes.

"Ninety-eight per cent of those who are today destroying themselves with base cocaine began with marijuana," he said. "I believe that we're risking too much. I have the sensation that we're playing with fire."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.