(CNN) Recreational marijuana use will soon be legal in Canada after the Senate passed a "historic" bill on Tuesday with a vote of 52-29.

Canada is only the second country in the world -- and the first G7 nation -- to implement legislation to permit a nationwide marijuana market. In the neighboring US, nine states and the District of Columbia now allow for recreational marijuana use, and 30 allow for medical use.

Bill C-45, otherwise known as the Cannabis Act, stems from a campaign pledge of Prime Minister Justin Trudeau to keep marijuana away from underage users and reduce related crime.

The act to legalize the recreational use of weed was first introduced on April 13, 2017, and was later passed at the House of Commons in November. The Senate passage of the bill was the final hurdle in the process.

Read More