A Canadian court ruled the government has three months to revise its unconstitutional medical marijuana program before the drug will become effectively legal to possess and produce in the country.

Ontario Superior Court Justice Donald Taliano ruled that Canada's medical marijuana program is invalid because regulations made it too difficult for sick Canadians to lawfully acquire the drug.

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

Sections 4 and 7 of the Controlled Drugs and Substances Act, which prohibit the possession and production of marijuana, and the Marijuana Medical Access Regulations were stricken down, but the judge suspended his ruling for three months to give the federal government time to revise the medical marijuana program.

"There are a million medical cannabis consumers in Canada and, in ten years, less than 10,000 have been able to become legal," Jacob Hunter, policy director for the Beyond Prohibition Foundation, said. "That just isn't right."

The government is reviewing the decision and weighing whether to appeal it, a spokeswoman told the The Canadian Press.

The ruling stemmed from the constitutional challenge of Matthew Mernagh, a 37-year-old man who suffers from several illnesses, including fibromyalgia, seizures and scoliosis, which cause severe pain in his spine.

Mernagh was arrested in 2008 after police officers seized 70 marijuana plants from his apartment. He claimed he was forced to grow the plants because he was unable to find a doctor to support his application for a medical marijuana license.

Justice Taliano granted Mernagh a "personal exemption" to possess or produce marijuana during the 90 days his ruling is stayed.