Bill C-45, also known as the Cannabis Act, was first introduced on April 13, 2017, in a bid to legalize and regulate the recreational use of weed. The bill passed in the House of Commons that November and then passed in the Senate on Tuesday night by a vote of 52-29, with two abstentions.
Medicinal use of the drug has been legal in Canada since 2001.
The proposed legislation allows adults in Canada to legally possess and use up to 30 grams of dried cannabis in public, as well as cultivate up to four cannabis plants at home and prepare products for personal use. Dried cannabis and cannabis oil will become commercially available later this year.
The minimum legal age to buy and consume pot in Canada will be set at 18, but the bill allows provinces and territories to increase the minimum age.
The law will come into effect Oct. 17.
Canadian Justice Minister Jody Wilson-Raybould, who sponsored the legislation, called the bill's passage a "historic milestone."
"This is an historic milestone for progressive policy in Canada as we shift our approach to cannabis," Wilson-Raybould said via Twitter Tuesday night. "This legislation will help protect our youth from the risks of cannabis while keeping profits out of the hands of criminals and organized crime."
The federal law fulfills a top campaign promise of Canadian Prime Minister Justin Trudeau and his Liberal Party.
"It’s been too easy for our kids to get marijuana -- and for criminals to reap the profits," Trudeau said via Twitter Tuesday night. "Today, we change that. Our plan to legalize [and] regulate marijuana just passed the Senate."