Legislation giving Ontario's government a monopoly on recreational marijuana sales in the province passed at Queen's Park on Tuesday.

MPPs passed the Cannabis Act 63 to 27, with support from the Liberals and the NDP, while the PC party voted no.

The bill creates a provincial agency that will distribute and retail pot through storefronts and online. It also creates stiff fines that could top $1 million against companies and people who sell marijuana in defiance of the government monopoly.

The bill gives municipalities the power to close pot shops as soon as their owners are charged, even if they have not been convicted. It also sets the minimum age to buy pot in Ontario at 19 and bans cannabis use in public places, workplaces and vehicles.

Ontario's legislation passed one day after the federal government agreed to give the provinces 75 per cent of marijuana tax revenue and set a target price for recreational pot of about $10 a gram.

Recreational marijuana use is to be legalized across Canada by July 1, 2018.

The tax revenue Ontario brings in from marijuana will not be enough to meet the costs the province will incur, Ontario Finance Minister Charles Sousa told reporters Tuesday.

Ontario's expected tax revenue from marijuana sales will not be enough to meet the extra costs the province will incur, says Finance Minister Charles Sousa. (Fred Chartrand/Canadian Press)

The government believes legalization will bring about increased costs in public education, addiction services, health care and enforcement of drug-impaired driving laws, Sousa said.

"The first few years [of legalization] is going to be all about recovering those costs and ensuring that we eliminate the illicit market," he said.

Sousa estimates that Ontario will collect 40 per cent of the provinces' share of tax revenue. That would mean about $120 million, based on forecasts announced in Ottawa on Monday.

For Ontario's treasury, total control over retailing recreational pot is likely to be far more lucrative than taxation. However, Sousa has yet to say how much profit he expects the province's cannabis agency will provide.

The agency is officially called the Ontario Cannabis Retail Corporation, but officials say the branding of its pot shops will be different. The province aims to open 40 marijuana storefronts in 2018, rising to about 150 by 2020.

Talks on how much pot revenue Ontario will pass on to municipalities can begin now that the provinces have reached their tax-sharing agreement with the federal government, Premier Kathleen Wynne said earlier Tuesday.

"We need to work with municipalities to understand what their costs are going to be, what our costs are going to be, and now we will do that work within this context of this sharing framework," Wynne said.

Asked why his party voted against the cannabis legislation, PC leader Patrick Brown said the Wynne government rushed the legislation in and failed to address concerns raised by police forces.