Canada's parliament has passed a law legalising the recreational use of marijuana nationwide.
The Cannabis Act passed its final hurdle on Tuesday in a 52-29 vote in the Senate. The bill controls and regulates how the drug can be grown, distributed, and sold.
Canadians will be able to buy and consume cannabis legally as early as this September.
The country is the second worldwide to legalise the drug's recreational use.
Uruguay became the first country to legalise the sale of cannabis for recreational use in December 2013, while a number of US states have also voted to permit it.
Cannabis possession first became a crime in Canada in 1923 but medical use has been legal since 2001.
The bill will likely receive Royal Assent this week, and the government will then choose an official date when the law will come into force.
Prime Minister Justin Trudeau tweeted that until now, "it's been too easy for our kids to get marijuana - and for criminals to reap the profits".
But some groups objected to the new law, with opposition Conservative politicians and indigenous groups among those voicing concerns.
The government is expected to give the provinces and territories, as well as municipalities, eight to 12 weeks to set up the new marijuana marketplace.
This timeframe will also allow industry and police forces to prepare for the new legal framework.
In 2015, Canadians were estimated to have spent about C$6bn ($4.5bn, £3.4bn) on cannabis - almost as much as they did on wine.
How will legal marijuana in Canada work?
It is likely that by mid-September, Canadians will be able to buy cannabis and cannabis oil grown by licensed producers at various retail locations.
Canadians across the country will also be able to order the drug online from federally licensed producers.
Adults will be able to possess up to 30 grams (one ounce) of dried cannabis in public.
Edibles, or cannabis-infused foods, will not be immediately available for purchase but will be within a year of the bill coming into force. The delay is meant to give the government time to set out regulations specific to those products.
The minimum legal age to buy and consume marijuana has been set federally at 18, but some provinces have chosen to set it at 19.
What will remain illegal?
It will be illegal to possess over 30 grams of cannabis, grow more than four plants per household, and to buy from an unlicensed dealer.
Penalties will be severe. Someone caught selling the drug to a minor could be jailed for up to 14 years.
Some critics say the penalties are too harsh and not proportional to similar laws like those around selling alcohol to minors.