After two years of back and forth, the federal government has finalized its new rules for medical marijuana and has granted a last-minute reprieve to pharmacists who opposed the rules in their draft form.

Health Minister Leona Aglukkaq rolls out the regulations this morning for final publication in the Canada Gazette on Wednesday.

Under the new regime, the government will no longer produce or distribute medical pot and medical marijuana users will no longer be allowed to grow the product at home.

Story continues below advertisement

Instead, the government will allow patients to buy prescribed amounts only from licensed growers under strict conditions.

In previous versions of the regulations, pharmacies were to distribute the product just like other medications, provoking the anger of pharmacists who feared being robbed.

But the final version removes the pharmacists from the loop, forcing patients to rely on mail order for their medical marijuana.

"While the courts have said that there must be reasonable access to a legal source of marijuana for medical purposes, we believe that this must be done in a controlled fashion in order to protect public safety," Aglukkaq said in a news release.

"These changes will strengthen the safety of Canadian communities while making sure patients can access what they need to treat serious illnesses."

She used similar reasoning last week when she introduced new hurdles for the creation of supervised drug-injection sites in response to a court ruling.

While the pharmacists were placated in the final version of the marijuana regulations, doctors were not. They have objected to being told to prescribe a product that has not been rigorously tested.