Ontario passed its cannabis legislation Wednesday, firmly establishing the right to smoke marijuana in public in the province hours after recreational use of drug became legal across Canada.

The Progressive Conservative government's bill changing previously established regulations on where recreational pot can be used was put to a final vote around 4:40 p.m. after closing statements from legislators, with 69 voting in favour and 41 against.

"It's a historic day," Finance Minister Vic Fedeli said in a speech to the legislature. "It is the end of an era, it is the end of a prohibition."

The bill, which loosens rules brought in by the previous Liberal regime, will allow Ontario residents to smoke recreational cannabis wherever the smoking of tobacco is permitted.

Premier Doug Ford, who faced criticism from the opposition for not having the bill in place before Wednesday afternoon, noted that the online Ontario Cannabis Store handled more than 38,000 orders in its first few hours of business.

"They stayed up all night working to fulfil the orders and I'm very, very proud of them," he said of those working on the web sales.

For now, cannabis can only be purchased through the government-run online portal, and Fedeli noted that any orders placed through the site would not yet have been delivered.

Private retail pot stores are set to open in the province in April. Ontario has established 19 as the minimum age for cannabis use.

NDP Leader Andrea Horwath said Wednesday that the Progressive Conservative government should have made passing cannabis legislation a priority after being sworn in this summer.

"Instead, we have a government scrambling to pass laws for a substance that is already legal," she said, adding that the government had decided to focus on other issues over the past months, such as Ford's move to slash the size of Toronto's city council.

"Nobody was unaware that it was Oct. 17 and yet we got pulled into this legislature time after time over the summer into the late mid-night hours to talk about his vendetta against his past foes at Toronto city hall," Horwath said.

Green Party leader Mike Schreiner also criticized the government for not passing its cannabis bill before legalization.

"The government really should have taken its responsibility seriously instead of being so obsessed with interfering in Toronto elections," he said.

The Ontario Cannabis Store website — which offers different types of pot with names such as Easy Cheesy, Super Sonic and Shiskaberry — garnered mixed early reviews on social media, with some praising the website's simple design while others complained about high prices.

Safety, privacy are priorities for online sales, AG says

Fedeli said he was happy with initial reports on the store's sales and defended some of the more unusual products available on the site, including an "intimate" spray with cannabis ingredients designed for amorous couples.

"We'll leave it to the Ontario Cannabis Store to continue to put products out there that the people of Ontario are looking forward to purchasing," he said.

Attorney General Caroline Mulroney has stressed that safety and privacy are priorities for the government when it comes to online sales.

"When you buy cannabis it's not going to be like going to Amazon and having packages left at the door," Mulroney said earlier this week. "Canada Post, when they deliver your package, will have to check your ID. Ensuring people's privacy is an important goal for us."

The province has also launched a public awareness campaign designed to educate people on the dangers of using pot and road safety.

"Just because the federal government has decided to legalize cannabis doesn't mean that it's safe," Mulroney said. "We want to be able to educate and keep Ontarians informed about the serious health and addictions risks that come with both short and long-term use of cannabis."

Meanwhile, a number of Ontario police services took to social media Wednesday to issue messages about pot legalization.

"Cannabis is no longer illegal on October 17, 2018. Up to four cannabis plants will be allowed per household," Toronto police tweeted. "Do not call police for this."

Ontario Provincial Police reminded drivers to keep safety in mind.

"New cannabis legislation arrives today," the force said in a tweet. "Everyone please be safe & remember impaired driving is impaired driving no matter what alters your state."