A historic vote at the United Nations today finally recognised the medicinal value of cannabis – a plant that has been used therapeutically for thousands of years.

After a recommendation from experts at the World Health Organisation, the UN’s Commission for Narcotic Drugs voted to remove cannabis from a list of drugs previously judged to have little medical benefit, which also oddly includes heroin. However, it still remains a banned drug for non-medical use under UN law.

The vote to remove cannabis from Schedule IV of the 1961 Single Convention on Narcotic Drugs was narrowly won by 27 to 25 votes, with the US and UK voting for the change and Russia heading a bloc of countries – including China, Pakistan and Nigeria – which were against the move.

The use of cannabis as a medicine has been traced back thousands of years, from a Chinese list of medicines in 15th century BC, to ancient Egypt and ancient Greece.

The UN decision will add to a growing drive in many countries to increase access to cannabis-based medicines, and could also spark more scientific research into the drug’s long-known medical properties. It could also act as catalyst for more countries to legalise the drug for medicinal use, which has often led to laws on recreational use being reconsidered.

Currently, more than 50 countries worldwide have adopted medicinal cannabis programmes. Canada, Uruguay and 15 US states have legalised recreational use, with Mexico and Luxembourg close to becoming the third and fourth countries to do so.

“This is welcome news for the millions of people who use cannabis for therapeutic purposes, and reflects the reality of the growing market for cannabis-based medicinal products,” said a joint press release from a group of drug reform NGOs.

Anna Fordham, executive director of the International Drug Policy Consortium (IDPC), said the drug’s recognition as a medicine was “long overdue”, but that its continued ban by the UN remains a sticking point.

“The original decision [in 1961] to prohibit cannabis lacked scientific basis and was rooted in colonial prejudice and racism,” said Fordham. “It disregarded the rights and traditions of communities that have been growing and using cannabis for medicinal, therapeutic, religious and cultural purposes for centuries, and has led to millions being criminalised and incarcerated across the globe.”

While the medical uses are now acknowledged, the non-medical use of cannabis remains in the most restrictive Schedule 1, alongside drugs deemed the most risky, such as cocaine and fentanyl.

“There’s been progress today, but we are still dealing with a horribly outdated and broken system,” Steve Rolles from the UK’s Transform Drug Policy Foundation told VICE World News. “It isn’t based on evidence of risk, and is not addressing the political realities of the growing movement for reform. So there’s still an awful long way to go.”