Lithuania's parliament on Thursday passed a law that will allow doctors to prescribe marijuana-based medicine in the Baltic EU state.

The lawmakers voted 90-0 with three abstentions in favour of the legislation that will now go to President Dalia Grybauskaite to be signed into law.

"It is a historic decision to ensure that patients can receive the best possible treatment," said lawmaker Mykolas Majauskas who tabled the bill.

Other European countries have legalised cannabis for medical purposes including Austria, Britain, Croatia, Finland, France, Germany, Greece and Italy among them.

"Of course, it does not mean cannabis will be available to get at a drugstore to smoke before going to a nightclub," Majauskas said.

The law will come into force in May next year. Selling the drugs will require a licence from the state regulator.

Recreational use of marijuana remains illegal in Lithuania, a Baltic state of 2.8 million people.