Germany is to legalise cannabis for medicinal purposes early next year, the health minister said on Tuesday.

"Our goal is that seriously ill patients are treated in the best possible way," said Hermann Groehe, who will present draft legislation to the German cabinet on Wednesday.

The draft bill comes as many parts of the world are relaxing laws on cannabis use and medicinal marijuana is gaining popularity to ease suffering from cancer, glaucoma, HIV or AIDS, Hepatitis C, Parkinson's disease and other serious conditions.

However, the issue of recreational and medical cannabis use is controversial in many countries, as opponents fear crime connected to drug abuse and addiction. Some argue pot use could lead to dependence on harder drugs.

Groehe acknowledged that cannabis was "not an inoffensive substance" and stressed that cannabis would be available from pharmacies only on prescription.

Until specially supervised plantations have been established to grow cannabis, Germany will import "medical marijuana", the minister added.

"Without wishing to pre-judge the work of the Bundestag (lower house of parliament), it is likely that the law will come into force in the spring of 2017," Groehe told German daily Die Welt.