Germany's government gave the go-ahead on Wednesday to relax rules on cannabis use by the seriously ill from early next year if they have no other treatment options.
Dried cannabis flowers and cannabis extracts will be available in pharmacies on prescription and the public health system will cover the cost, according to the draft bill that is expected to come into force from spring 2017.
Other countries that allow cannabis use for medical purposes include Portugal, Italy and the Czech Republic. Some U.S. states have decriminalised cannabis completely.
Until now, seriously ill people in Germany with cancer, AIDS, Parkinson's disease or multiple sclerosis could only access cannabis with special approval and had to pay themselves.
"Our aim is that seriously ill people are treated in the best possible way," Health Minister Hermann Groehe said in a statement.
The government is to set up specially supervised plantations to grow cannabis and will import what it needs for now.
IBISWorld, a market research firm, projects sales of marijuana for medical use to increase to $13.4 billion in 2020 from $3.6 billion in 2015.