Watch Charlie Frost's report for ITV News Anglia
The family of Archie Battersbee have won their appeal against a ruling that said the 12-year-old is dead.
Court of Appeal judges said case should be sent back to the High Court, where it will be heard by a judge who will decide whether it is in his best interests for life-support treatment to end.
Archie's parents, Hollie Dance and Paul Battersbee, argued that High Court judge Mrs Justice Arbuthnot made errors in her recent judgement, which had concluded that doctors could lawfully stop providing treatment to him.
Three appeal judges analysed the case at a Court of Appeal hearing in London on Wednesday and said there should be another High Court hearing.
Speaking after the ruling, Ms Dance said the family were "delighted", adding: "We wanted another hearing and we’ve got everything we wanted.”
Mr Battersbee said: “It couldn’t really have gone any better today.”
The new hearing has been scheduled for 11 July.
Archie suffered brain damage at home on 7 April, and was found unconscious with a ligature over his head. His mother, who found him, believes he may have been taking part in an online challenge. He has not regained consciousness.
Lawyers representing Archie’s parents, Hollie Dance and Paul Battersbee, of Southend, Essex, began making their case on Wednesday morning.
Edward Devereux QC, who is leading Archie’s parents’ legal team, told the judges: “The case should be remitted for consideration by a High Court judge who should considerer whether it is in Archie’s best interests for life-sustaining treatment to continue.”
Appeal judges Sir Geoffrey Vos, the Master of the Rolls; Sir Andrew McFarlane, the president of the Family Division of the High Court and most senior family court judge in England and Wales; and Lady Justice King made their decision on Wednesday afternoon.
Doctors treating Archie at the Royal London Hospital in Whitechapel, east London, told Mrs Justice Arbuthnot how they thought that he was “brain-stem dead”, treatment should end and Archie should be disconnected from a ventilator.
Archie’s parents say his heart is still beating and want treatment to continue.
They had previously pleaded with the judge for more time and said they would be "praying for miracles" for their son.
After the High Court judge's ruling that Archie was already dead and that doctors could legally stop treating him, his family signalled their immediate intention to appeal.
Speaking outside the court, Ms Dance promised that she would fight the ruling and said the hospital was facing "the biggest battle ever".
At a hearing to determine if the family could appeal, Mrs Justice Arbuthnot heard submissions from the family's lawyers and concluded that there was a "compelling reason" why the case should be sent to the Court of Appeal.
Mr Devereux told her evidence had not shown “beyond reasonable doubt” that Archie was dead.
He said a decision had been made on a balance of probabilities – and argued a decision of such “gravity” should have been made on a “beyond reasonable doubt” basis.
Mr Devereux argued that judges should apply a “standard of proof of beyond reasonable doubt”, not the balance of probabilities, when deciding whether to declare that Archie was dead.
Want a quick and expert briefing on the biggest news stories? Listen to our latest podcasts to find out What You Need To Know