An Ontario court has struck down Canada's laws that prohibit the possession and growing of marijuana after ruling that the medical marijuana program is unconstitutional.

Ontario Superior Court Justice Donald Taliano found that the marijuana program is failing to ensure that patients who need the drug can get the necessary approvals. So the St. Catharines, Ont. justice declared the "Marihuana Medical Access Regulations" invalid.

And, because the problems with the program force medical marijuana users to resort to illegal means to obtain their marijuana, Taliano also struck down two sections of the Controlled Drugs and Substances Act that prohibit possession and cultivating marijuana.

He deemed the sections unconstitutional because they can be used to charge medical marijuana users who haven't been able to obtain medical marijuana licences.

"Rather than promote health – the regulations have the opposite effect. Rather than promote effective drug control – the regulations drive the critically ill to the black market," he wrote.

The ruling doesn't immediately make pot possession legal: the judge suspended his ruling for three months, giving Ottawa until July to fix the problems his ruling identified.

The federal government is expected to appeal.

The case was brought by Matthew Mernagh, a 37-year-old St. Catharines man who suffers from several illnesses, including fibromyalgia, seizures and scoliosis.

He says marijuana is the most effective treatment for his pain but has been unable to find a doctor to support his application for a medical marijuana licence. So he resorted to growing his own cannabis and was charged with producing the drug.

Taliano stayed those charges with his ruling.

The court heard that doctors across Canada have effectively boycotted Health Canada's medical marijuana program. The doctors have been refusing to grant the licences because they say they haven't been given enough training about how to prescribe the drug. They also say the government has failed to fund sufficient clinical trials of the drug.

Several other medicinal users of the drug testified they faced similar problems that Mernagh described, and that Health Canada would take months to process their applications.