Conservative leader David Cameron says he would be "relaxed" about legalising cannabis for medicinal use if there were evidence of its health benefits.
Trials are continuing on medicinal use of cannabis
In response to a question posted on his internet site, he said he would be "guided by the science and evidence".
Mr Cameron said he opposed making cannabis legal but added: "If it could be proved there was a real medicinal benefit I would be relaxed by that."
Mr Cameron made clear he did not favour legalising the drug's recreational use.
He said: "It is right that it's criminal because if you decriminalise you increase the availability and make it more difficult for parents who are trying to keep their children away from drugs."
Trials have been taking place on the medicinal use of cannabis-based drugs. Sativex, a cannabis-derived mouth-spray, is licensed in Canada to relieve pain in people with multiple sclerosis.