Canada is on track to become the first G-7 nation to legalize marijuana, and the second country in the world (after Uruguay), after its Senate approved legislation in a 52-29 vote, paving the way for recreational cannabis to be legally bought and sold within the next few months.

The vote clears the way for the government in Ottawa to take the final step: The ceremonial approval of by the governor-general that would make Bill C-45 law. Still, not all of the details have been ironed out. For example, the date for when the law would take effect remains unclear. And lawmakers have said it will take a few months for producers and retail stores to stock up and get ready for legal sales to begin, according to Bloomberg.

Possession of Cannabis became a crime in Canada way back in 1923, but it has been legal for medicinal purposes since 2001. Yet despite the culture's longstanding permissiveness when it comes to marijuana, some groups objected to the law, including conservative politicians and indigenous groups who felt they hadn't been consulted about the bill. But their resistance wasn't enough to scuttle the law, and by mid-September, Canadians will be able to buy cannabis and certain cannabis products at retail shops - though cannabis edibles will not be available for purchase for another year because the government says it needs time to decide on appropriate regulations. Meanwhile, adults will be allowed to possess one ounce of the stuff in public, according to the BBC.

Even after the law takes effect, it will still be illegal to possess over 30 grams of cannabis, grow more than four plants per household and to buy it from an unlicensed dealer. Marijuana is legal for medicinal purposes in 14 European countries, Israel, Argentina, Puerto Rico, Panama, Mexico, Turkey, Zambia and Zimbabwe. In the US, medicinal marijuana is allowed in 29 states, and the District of Columbia. In addition, nine states have legalized it for purchase. Spain, the Netherlands, Portugal, Slovenia, Jamaica, Chile, Peru, Colombia, Ecuador, Luxembourg and some parts of India have all decriminalized the drug for personal use.

Canadian Prime Minister Justin Trudeau celebrated the vote as a victory for the government, which will "reap the profits" of marijuana legalization, he said in a tweet.

It’s been too easy for our kids to get marijuana - and for criminals to reap the profits. Today, we change that. Our plan to legalize & regulate marijuana just passed the Senate. #PromiseKept — Justin Trudeau (@JustinTrudeau) June 20, 2018

Trudeau's liberal party introduced the bill last year in a bid to make Canada the second country in the world after Uruguay to legalize marijuana for recreational use, according to the Guardian. Analysts estimate that sales of cannabis could amount to between C$5 billion and C$7 billion annually. Sales systems will vary between provinces: In New Brunswick, marijuana will only be available at a state-run chain called CannabisNB. The minimum age to consume it will vary between 18 and 19, depending on the province.

One government spokesman insisted that the government had been prudent in its approach and that it has made it clear that "it's not party time."

On Tuesday, supporters of the legislation stressed the cautious, prudent approach to the landmark change. "What the government’s approach has been is, yes, legalisation but also strict control," said Peter Harder, the government’s representative in the Senate. "That does not in any way suggest that it’s now party time."

Canada will now explore the idea of clearing all criminal convictions for simple possession, and is also pressuring the US to drop a policy that prevents Canadians who admit to having smoked marijuana from traveling to the US.