Canada’s upper house of Parliament on Tuesday approved a revised bill to legalise the recreational use of marijuana, reported The Toronto Star. The Senate voted 52-29 in favour of the bill, paving the way for a fully legal cannabis market within eight to 12 weeks.

The House of Commons – the lower house of the Canadian Parliament – approved the bill in November.

Prime Minister Justin Trudeau’s Liberal Party had made legalising recreational use of marijuana part of his 2015 election campaign, arguing that the new law would keep cannabis out of the hands of underage users and reduce related crime.

“It’s been too easy for our kids to get marijuana – and for criminals to reap the profits,” he tweeted on Wednesday. “Today, we change that. Our plan to legalise [and] regulate marijuana just passed the Senate.”

“We have seen in the Senate tonight a historic vote that ends 90 years of prohibition of cannabis in this country, 90 years of needless criminalisation, 90 years of a just-say-no approach to drugs that hasn’t worked,” said independent Senator Tony Dean, who sponsored the bill in the upper house.

The bill allows adults to possess up to 30 grams of dried cannabis in public, reported BBC. The minimum legal age to buy and consume marijuana is 18, but some provinces have set it at 19.

The law makes Canada the second country to have a nationwide legal marijuana market after Uruguay. Canada is also the first country in the Group of Seven to legalise cannabis.