Health Canada said medical marijuana patients would also continue to have the option of buying cannabis from one of 34 producers licensed by the federal government.

But it reiterated that storefronts selling marijuana, commonly known as dispensaries or compassion clubs, are not authorised to sell cannabis for medical or any other purposes.

"These operations are illegally supplied, and provide products that are unregulated and may be unsafe. Illegal storefront distribution and sale of cannabis in Canada are subject to law enforcement action," Health Canada said in a statement.

Canada's former Conservative government overhauled the country's medical marijuana program in 2013, requiring patients buy cannabis from licensed producers through a mail order system.

A federal court judge in Vancouver ruled in February that the restrictions imposed by the Marijuana for Medical Purposes law were arbitrary.

The changes to the medical program came as Canada and the United States are looking at how to deal with the push to legalise marijuana for medical or recreational uses.

Liberal Prime Minister Justin Trudeau campaigned on a promise to legalise recreational marijuana and the government has said it would introduce legislation by the spring of 2017.

Twenty-five US states have sanctioned some forms of marijuana use for medical purposes, while four allow recreational use. Nine other states have recreational or medical marijuana proposals headed for their ballots in the November election.

The US Drug Enforcement Administration earlier on Thursday denied requests to loosen the classification of marijuana as a dangerous drug with no medical use.

Shares of Canadian medical marijuana producers edged lower after the announcement.

Originally published as Canada lets medical patients grow cannabis