Uruguay’s lower house last night approved a sweeping bill to legalise cannabis.

The move opens the way for the authorities to create one of Latin America’s most ambitious nationwide endeavours in overhauling drug policy.

Following hours of debate, legislators in Uruguay’s capital, Montevideo, voted 50-46 in favour of the legislation, which now goes to the Senate, where lawmakers have assured President Jose Mujica that they have a comfortable majority to approve the legislation.

Mr Mujica supports the bill, arguing that it is needed to redirect police resources toward fighting street crime and smugglers involved in trafficking other types of drugs.

“This is a very innovative bill, with the state deciding to regulate the entire chain of production, distribution and access to the substance,” said Laura Blanco, president of Uruguay’s Cannabis Studies Association.

She said the bill sent an “encouraging” sign to other Latin American nations, as political leaders in parts of the region debate whether to follow Uruguay’s example.

Under Mr Mujica (78), an outspoken former guerrilla, Uruguay has emerged as a laboratory for socially liberal policies.

A nation of only 3.3 million people, the country has also enacted a sweeping abortion rights law, moved to legalise same-sex marriage and is seeking to become a centre for renewable energy ventures.

The cannabis bill has been under consideration for more than a year, with Mr Mujica urging legislators last year to postpone voting on it after polls showed that a majority of Uruguayans were opposed.

A majority in Uruguay is still thought to be against the legalisation, but lawmakers moved ahead with the vote after nonprofit groups banded together in an educational campaign to explain the medicinal uses of cannabis and the economic benefits of cultivating the plant in Uruguay, where criminal networks now smuggle cannabis largely from Paraguay.

Under the bill, which could become law as early as this month, people would be allowed to grow the drug in their homes, limited to six plants per household. They would also be permitted to form co-operatives allowed to cultivate 99 plants.

In addition, private companies could grow plants under the bill, although their harvests could be bought only by the government, which would market the drug in licensed pharmacies.

To buy cannabs in pharmacies, Uruguayans would be required to enter their names into a federal registry, which is intended to remain confidential, and would be limited to buying 40 grams per month.

In a move to prevent foreign tourists from flocking to Uruguay to smoke cannabis, the legislation would restrict legal purchases to Uruguayans. Use of the drug is already largely tolerated by the Uruguayan authorities.

Some people in Uruguay remain opposed to the bill, contending that it would increase drug use among the young. “This is an adventure which may end up endangering an entire generation,” said Gerardo Amarilla, an opposition legislator with Uruguay’s National Party.