The Home Office has backed down over its refusal to release medicinal cannabis oil that it had confiscated from the family of a severely epileptic boy.

Sajid Javid said he had used an exceptional power as home secretary to issue a licence for Billy Caldwell to be treated with the oil as a matter of urgency.

Billy’s mother, Charlotte Caldwell from County Tyrone, said her family had “achieved the impossible” in getting the oil back, and criticised the “dreadful, horrific, cruel experience” her son had suffered.

Billy’s cannabis oil was confiscated at Heathrow on Monday. It contains a psychoactive substance called tetrahydrocannabinol (THC) that is illegal in the UK but available elsewhere, and had kept his epilepsy at bay.

After it was taken from him, Billy suffered two seizures that other medicines could not control and he was taken to Chelsea and Westminster hospital by ambulance on Friday.

Following Billy’s admission, the Home Office came under intense pressure to allow him to be prescribed the medicine that had successfully controlled his seizures for 300 days.

“This is a very complex situation, but our immediate priority is making sure Billy receives the most effective treatment possible in a safe way,” Javid said.

His move has, however, failed to dispel the strong feelings that the case has generated. Many experts believe Billy’s story reveals the inadequacy of many of Britain’s drug laws.

“The case is the product of a failed 50-year prohibitionist approach to recreational cannabis that has actually increased use harms and denied medical progress,” said David Nutt, a professor of neuropsychopharmacology at Imperial College London.

“Cannabis oil is a medicine in many countries, but not in the UK because the Home Office say it is not so. Even though it clearly has revolutionised his health, and is – for Billy – a proven medicine, no UK doctor can prescribe it. That is absurd and inhumane.”

Nutt’s view was backed by the Caldwell family’s MP, Órfhlaith Begley of Sinn Féin. “Billy should never have been put in that position. The treatment was clearly working for him and he deteriorated badly once it ended, yet it still took intense lobbying to get the Home Office to reverse this cruel decision,” she said.

Billy’s mother also vowed to keep up her fight to allow others in the UK to have access to the medication. “My experience leaves me in no doubt that the Home Office can no longer play a role in the administration of medication for sick children in our country,” she said. “Children are dying in our country and it needs to stop now.”

The decision to allow Billy treatment marks the first time that cannabis oil containing THC has been legally prescribed in the UK since it was made illegal in 1971.

A doctor in Northern Ireland had prescribed cannabis oil for Billy last year. It was the first time a child had been issued the substance on the NHS. The Home Office, however, ordered the doctor to stop prescribing the medicine as it was “unlawful to possess Schedule 1 drugs”. This prompted the Caldwells to go to Canada to obtain the medicine.

When they returned with six months’ worth of cannabis oil, it was confiscated and a minister told them it would not be returned.

The Home Office then recommended three neurologists who could help manage Billy’s transition off cannabis oil, but none subsequently saw him. Caldwell said one of the experts told her they did not have the time, another was on holiday and the third did not return her calls.