Sick Canadians have the right to grow their own medical marijuana, a Federal Court judge ruled Wednesday, striking down a ban on home growing that was introduced when Ottawa moved to a system of large-scale commercial producers.

The decision, released Wednesday, will force the federal government to rewrite the rules for medical pot for the second time in just a few years – a process that will unfold as the Liberals also work to legalize the drug for recreational use.

The court suspended its judgment for six months to give the federal government time to rewrite its medical marijuana regulations, which the judge ruled are "over broad and arbitrary" because they effectively force patients to choose between their medicine and prison.

Story continues below advertisement

"I agree that the plaintiffs have, on a balance of probabilities, demonstrated that cannabis can be produced safely and securely with limited risk to public safety and consistently with the promotion of public health," Justice Michael Phelan wrote.

John Berfelo, a cannabis advocate who wasn't a plaintiff but helped raise money to cover legal costs, said Wednesday's ruling means he no longer has to live in fear of the government destroying his 144 plants in Abbotsford, east of Vancouver. He and thousands of others have been able to continue growing their own marijuana under a court injunction.

"A win for me now just means I don't have to go into hiding – it's just amazing," said Mr. Berfelo, who started substituting marijuana for opioids in 2007 to cope with a horrific spinal injury suffered in the workplace.

The ruling comes at a pivotal time for marijuana policy in Canada. The Liberals won last year's federal election with a promise to legalize pot, a process that is expected to take more than a year.

At the same time, licensed producers have been lobbying the government for a role in recreational production, while pharmacy chains have signalled they want to sell the drug. Municipalities, meanwhile, are dealing with the proliferation of illegal dispensaries.

The Federal Court case was launched by four B.C. patients who challenged the constitutionality of the former Conservative government's 2014 overhaul of the medical marijuana system. The updated regulations prohibited home grow-ops and established a network of large commercial growers that ship their products directly to customers.

But Justice Phelan ruled the current system does not guarantee that "the necessary quality, strain and quantity [of cannabis] will be available when needed at some acceptable level of pricing."

Story continues below advertisement

The judge rejected arguments from government lawyers, who claimed home grow-ops posed security, fire and health risks for patients, their neighbours and children who may be exposed to the drug.

The ruling also extends an ongoing injunction for roughly 28,000 Canadians who were licensed to produce their own medicinal marijuana under the old system.

John Conroy, a lawyer for the plaintiffs, said he wants the federal government to expand that injunction quickly to allow new patients to grow medical marijuana. He said the departments of Public Safety, Health and Justice could craft new rules that allow for home growing without going back to Parliament to pass a new law.

"They should immediately get to work trying to make sure that we have in place a reasonable process for patients to continue to produce [medical marijuana]," Mr. Conroy told a crowd of reporters at a celebratory news conference in Vancouver attended by a dozen joint-smoking activists.

Health Minister Jane Philpott did not rule out appealing the decision, but she also made it clear the regulations that were struck down were designed by the previous Conservative government.

She said the Liberals will ensure marijuana remains available to Canadians for medical purposes, suggesting the federal response could involve looser regulations.

Story continues below advertisement

"My priority is to make sure, on the matter of medical marijuana, that Canadians who require access to it have fair access," Ms. Philpott told reporters in Ottawa.

She insisted the ruling does not have any implications for the government's ongoing plans to legalize marijuana for recreational purposes.

About two dozen commercial producers are currently shipping dried marijuana and, more recently, cannabis oils to roughly 30,000 patients, according to the latest data from Health Canada.

Brent Zettl, CEO of licensed producer Prairie Plant Systems Inc., said he can envision a hybrid system in which the government keeps regulating the existing large-scale growers while allowing other patients to grow their own.

Still, the "hassle factor" is too high for most patients to start growing their own, said Mr. Zettl, whose company was the sole commercial provider for federally approved patients for more than a decade.

There are roughly 500,000 medical cannabis users in Canada over the age of 25, according to a survey commissioned by Health Canada – a substantial proportion of whom are not purchasing the drug from licensed commercial producers.

Story continues below advertisement

With a report from Daniel Leblanc in Ottawa