Canada's Senate passed a law Thursday legalizing recreational marijuana, moving it closer to becoming the first member of the Group of Seven nations to legalize the production, sale and consumption of the drug.

Bill C-45, or the Cannabis Act, passed the Senate with 52 votes for, 30 against and one abstention after months of debate over the ramifications of legalization.

The Cannabis Act will now go back to the House of Commons, which passed the bill in November 2017 but needs to sign off on changes made by the Senate.

Legalizing weed was a 2015 campaign promise of Prime Minister Justin Trudeau, who has admitted having smoked a joint with friends "five or six times."

The initial timeline for legal pot sales called for it to be available by July 1, Canada's national day, but autumn now appears more likely.