TORONTO -- Ontario has introduced legislation to regulate the sale and distribution of recreational marijuana starting next summer and it includes steep fines for illegal dispensaries.

The rules would take effect once the federal government makes the drug legal in July 2018.

Ontario was the first province to announce its detailed marijuana plan last month, which included the sale of the drug in up to 150 stores run by the Liquor Control Board of Ontario.

Those stores will only sell to people 19 and older, a minimum age that would also apply to possession, home growing and use of marijuana.

The bill will also contain new penalties for people or businesses that are convicted of illegally selling or distributing cannabis, including fines of up to $250,000 for individuals and/or jail of up to two years less a day. Corporations would face fines of up to $1 million for the same offence.

The law would also allow police to immediately close premises they suspect are being used for the illegal sale or distribution of marijuana.

Ontario Premier Kathleen Wynne said ahead of the bill's introduction that an important part of the Liberal government's plan is shutting down illegal dispensaries.

"I think that there needs to be a regulation of cannabis and we have a history in this province of regulation of alcohol and I think that doing this in a safe, responsible way means that we put some parameters around the distribution of this substance," she said.

"As resources are identified to deal with enforcement and education we recognize that municipalities need to have a substantial share of that because they are actually on the ground going to be doing enforcement."

Some Ontario municipalities have expressed concern that they will have to foot the enforcement bills for shutting down marijuana dispensaries.

Toronto Mayor John Tory said Wednesday he is "looking forward" to getting money to help with that, because it's about the rule of law.

"These shops, to the best of my knowledge, are illegal, have always been illegal, will continue to be illegal and are not contemplated as being part of the regime going forward," he said.

"We want to be able to keep children and families and neighbourhoods and schools and retail strips safe and stable and that we need to be able to do that so it isn't kind of a Wild West environment where people can just go out and set up any kind of a shop they want. I don't think anybody really supports that except perhaps the people that are operating the shops."

The bill also includes a ban on consumption in public spaces or workplaces.

The government has been coy on potential pricing, saying decisions will be made after more details come from the federal government, but that the aim is stay away from overly expensive prices that fuel illegal sales.

"This actually isn't about money, from my perspective," Wynne said. "This is about making sure that a substance that needs to be regulated is regulated in a safe and responsible way."

Municipalities in Ontario will find out in the coming weeks where the government wants to locate the first batch of cannabis stores, but the finance minister has said none will be near schools.