The High Court has denied a request for Archie Battersbee to be moved to a hospice to die.
It comes after the family of the 12-year-old filed a last-minute bid to have him moved so he could die “with dignity” in a hospice rather than in a hospital.
Ruling that Archie should remain in hospital while his life-sustaining treatment is withdrawn, Ms Justice Theis said: “Archie's best interests must remain at the core of any conclusions reached by this court.
In response, Archie’s family lodged an appeal with the Court of Appeal with three judges to decide in writing whether their claim can be heard.
Following the ruling, Archie's mother Hollie Dance said: “All our wishes as a family have been denied by the authorities.
“We are broken, but we are keeping going, because we love Archie and refuse to give up on him.”
The judge also refused permission to appeal against her ruling, after lawyers for the family requested it.
The family may now pursue a challenge directly with the Court of Appeal, and Mrs Justice Theis granted a stay on the withdrawal of treatment until 2pm on Friday to allow time for an appeal to be lodged.
Doctors treating the schoolboy for the past four months declared Archie to be “brain-stem dead”, prompting a lengthy but ultimately failed legal battle by his family to continue his life support treatment in the hope the unconscious boy would recover.
The European Court of Human Rights (ECHR) refused an application from the boy's parents on Wednesday to delay any changes to his treatment, which was due to be withdrawn from 11am on Thursday.
Hollie Dance, the boy's mother, said she wanted her son to “spend his last moments” together with his family privately.
Speaking to Times Radio hours before her son's life support was due to be turned off, Ms Dance said that Archie's loved ones have not been able to have privacy at the hospital, saying: “We can't even have the chance to be in a room together as a family without nurses.”
She added: “There's absolutely no privacy, which is why, again, the courts keep going on about this dignified death - why aren't we allowed to take our child to a hospice and spend his last moments, his last days together privately?
“Why is the hospital obstructing it?”
She said: “It's going be awful today.
“I woke up absolutely sick to my stomach. Like I just feel this hospital have so much to answer for and I don't really know what else to say today.”
Archie has been in a coma since he was found unconscious at his home in Southend, Essex, on 17 April and is being kept alive by a combination of medical interventions, including ventilation and drug treatments, at the hospital in Whitechapel, east London.
Ms Dance believes he was taking part in an online challenge at the time he became ill. He has not regained consciousness since.
Barts Health NHS Trust has said Archie's condition is too unstable for a transfer and that moving him by ambulance to a different setting “would most likely hasten the premature deterioration the family wish to avoid, even with full intensive care equipment and staff on the journey”.
A High Court order made in July requires that Archie remains at the Royal London Hospital while his treatment is withdrawn.
A family spokeswoman said a hospice has agreed to take him, adding: “Hospices are well and truly designed for palliative and respite care.
“Archie is now obviously on palliative care so there is no reason whatsoever for him not to take his last moments at a hospice.”