Campaigners have welcomed "momentous" plans to allow doctors to prescribe cannabis products to patients from next month.
Home Secretary Sajid Javid has decided to reschedule the products, relaxing the rules about the circumstances in which they can be given to patients, after considering expert advice from a specially commissioned review.
The new regulations follow several high-profile cases, including that of young epilepsy sufferers Alfie Dingley and Billy Caldwell, whose conditions appeared to be helped bycannabis oil.
Setting out the new regulations regarding cannabis-based products for medicinal use, Mr Javid said: "This brings these products explicitly into the existing medicines framework.
"These regulations are not an end in themselves. The ACMD (Advisory Council on the Misuse of Drugs) will be conducting a long-term review of cannabis and the National Institute for Health and Care Excellence (Nice) has been commissioned to provide advice for clinicians by October next year.
Alfie's mother, Hannah Deacon, was one of many campaigners to celebrate the move.
She said: "Today is a momentous day for every patient and family with a suffering child who wish to access medicinal cannabis.
"We urge the medical world to get behind these reforms so they can help the tens of thousands of people who are in urgent need of help.
"I have personally seen how my son's life has changed due to the medical cannabis he is now prescribed.
"As a family we were facing his death. Now we are facing his life, full of joy and hope which is something I wish for each and every person in this country who could benefit from this medicine."
Professor Mike Barnes, the medical cannabis expert who secured its first long-term licence for Alfie, said: "This announcement has transformed the position of the UK in this exciting and developing field.
"Many of my medical colleagues are understandably unsure about the benefits.
"After all, medical cannabis has been illegal in the UK for generations. But I urge them to embrace these developments.
Billy Caldwell's mother, Charlotte Caldwell, said she was crying tears of joy at the announcement.
She said: "It's been a treasure just out of reach for what seems like forever, but to see it in writing from the Government is incredible.
"This isn't about Billy and me, it's about a nation.
"Only relatively recently did our Government and country really start to appreciate just how many wee children and people of all ages were affected by the difficulties associated with accessing medicinal cannabis.
"But once it became clear that it wasn't just about what was perceived to be a small number of very sick children, and that medicinal cannabis could make a life-changing or life-saving difference to more than a million people, the overwhelming support of the public and the incredible speed of reaction of the Home Secretary has delivered an utterly amazing result.
Here is everything you need to know:
When will cannabis be available on prescription in the UK?
Doctors in England, Wales and Scotland will be able to prescribe cannabis products to patients from November 1, 2018.
What conditions will medical cannabis be prescribed for?
The new law will not limit the types of conditions that can be considered for treatment and it means doctors will no longer need to seek approval from an expert panel in order for patients to access the medicines.
Who can prescribe medical cannabis?
GPs will not be able to prescribe medical cannabis, only specialist doctors will be able to make decisions on prescribing cannabis-based products for medicinal use on a case-by-case basis, and only when the patient has an unmet special clinical need that cannot be met by licensed products.
Does this mean cannabis is now legal in the UK?
Cannabis is still a Class B drug which means that recreational use is still illegal and possession will still carry an unlimited fine and up to five years in jail.