Canadian medical marijuana patients have won the right to grow their own bud in a landmark court ruling released Wednesday.

Federal Judge Michael Phelan has ruled in favor of four British Columbia residents, declaring the country's medical marijuana regime, known as the Marijuana for Medical Purposes Regulations (MMPR), unconstitutional.

This means that the federal law passed by the former Conservative government of Stephen Harper has no force and effect.

The judge ordered the ruling suspended for six months, giving the Liberals, who campaigned on legalizing and regulating pot, time to revise the legislation. In the meantime, the judge has upheld a previous injunction that allows patients to continue growing their own cannabis.

"It's pretty darn exciting, that for sure," said Sandra Colasanti, a BC resident who helped organize funding to bring the case. "This took a lot of work from all the patients. There were patients who were on permanent disability and still put it five dollars."

Health Canada must move to immediately allow new entrants to production and address changes. Anything less is unjust. — KirkTousaw (@KirkTousaw) February 24, 2016

Introduced in 2013, the MMPR required that patients buy their pot from a government regulated and licensed producer, rather than growing their own or purchasing it from a dispensary.

Doctors serve as the gatekeepers under this system, but lack of guidance from Health Canada has made those willing to prescribe pot few and far between.

Following today's ruling, attorney for plaintiffs Kirk Tousaw called for the government to act swiftly."Health Canada must move to immediately allow new entrants to production and address changes. Anything less is unjust," Tousaw wrote on Twitter.

The court's decision is subject to appeal by the Canadian government, but if it stands it will send the Liberals back to the drawing board in their effort to develop a regulatory regime for medical marijuana.

Marijuana plants for sale are displayed at the medical marijuana farmers market in Los Angeles Thomson Reuters The MMPR replaced earlier legislation that was drafted in response to an Ontario Court of Appeal decision in 2000, which said banning a patient from growing marijuana for medical purposes "deprived him of his rights to liberty and security of the person.

Today's ruling leaves a regulatory vacuum if there is no action within the six month stay. That the MMPR is unconstitutional does not validate the earlier Marihuana Medical Access Regulations, which was repealed with the enactment of the 2013 law.

"It basically creates a big void, where there's no regime," Hugo Alves, a partner with Toronto law firm Bennett Jones, told VICE News. "If you were a patient under the MMPR, you've got nothing now, because there's no underlying regime."

For those patients growing their own weed, this will create a problem if there's no legislative movement or further court rulings in the next six months.

"Absent a replacement or exemption, those in need of medical marihuana — and access to a Charter compliant medicine marihuana regime is legally required — face potential criminal charges," wrote Judge Phelan in his ruling.

The decision to throw marijuana regulation back to the legislature came as a surprise to some licensed pot producers and doctors who work within the regulatory framework.

Rachel Swenie/Plant Chicago, NFP Ronan Levy, the director of Canadian Cannabis Clinics, said that he thought the MMPR had done a good job balancing patient's interests in "safe, legal, properly produced cannabis" with mitigating public nuisances and fire risks that the government's attorneys argued accompany home growing.

Levy — whose company connects patients with doctors willing to prescribe pot as appropriate — also said that the variability of home-grown weed is one of the factors that makes many physicians wary.

"I think you're going to find less doctors feeling comfortable with cannabis, and if that's the result, the increased access by allowing home growing is going to be offset by fewer doctors feeling like prescribing," said Levy.

For Canada's 29 licensed pot producers that operate under the MMPR, this decision creates serious uncertainty. Stock prices for Tweed, Canada's first publicly-traded marijuana producer, dropped significantly after the court ruled this afternoon.

John Fowler, the president of Supreme, another licensed producer, said that he hopes the government won't appeal the ruling, but take it as a message that better regulations need to be developed.

"I hope the Liberals look at the political issue here, at the fact that some Canadians can't afford any medical marijuana, and come up with balance between the interest of the [licensed producers] and the health interest of Canadians," said Fowler.

Reporting contributed by Justin Ling