LONDON — Doctors in Britain will be able to legally prescribe medicinal cannabis from Nov. 1, after two highly publicized cases of young, epileptic patients dependent on marijuana-based treatments put pressure on the government to review its policy.

The change was announced on Thursday by Home Secretary Sajid Javid, after he called for an urgent review of cannabis-based medicinal products over the summer, and his office said in July it had decided that “senior clinicians will be able to prescribe the medicines to patients with an exceptional clinical need.”

Mr. Javid said on Thursday, “Having been moved by heartbreaking cases involving sick children, it was important to me that we took swift action to help those who can benefit from medicinal cannabis.”

The home secretary commissioned the review after the cannabis-based medicine of Billy Caldwell, 12, who has life-threatening epileptic seizures, was confiscated at Heathrow Airport on June 11. The case was publicized in the British news media and prompted a national discussion on the legalization of medicinal cannabis products.