A boy who suffered brain damage in an incident at home should undergo a test to establish whether he is dead, a judge has ruled.
Specialists treating Archie Battersbee, 12, of Southend, Essex, think it is "highly likely" he is dead, and say life-support treatment should stop.
His parents have raised concerns over the Royal London Hospital's proposals.
Mrs Justice Arbuthnot said a brain stem test would be in Archie's best interest.
She made the ruling at a hearing in the Family Division of the High Court in London on Friday.
The hospital treating Archie, Barts Health NHS Trust, had asked the judge to rule that a brain stem test would be in Archie's best interests.
A specialist told the judge that the brain stem was responsible for the functions which kept people alive.
His parents want treatment to continue and have questioned the test's reliability, fearing it could cause more damage and asked why Archie, who lives with his mother, was not receiving treatment to relieve swelling on his brain.
Archie was found unconscious at home on 7 April, his mother Hollie Dance has said, adding at first it was thought to be an accident but also could have been part of an online challenge.
Ms Dance had urged the judge to give her son, a keen gymnast, "more time".
"Everyone is in such a rush," she said.
On 5 May, barrister Fiona Paterson, representing Barts Health NHS Trust, said Archie had never regained consciousness and was dependent on mechanical ventilation.
"Even if Archie is not brain-stem dead, his treating team consider that it is highly unlikely that he will ever recover consciousness and consequently it is in his best interests that his mechanical ventilation be withdrawn," she said.
Bruno Quintavalle, representing parents Ms Dance and Paul Battersbee, said they were concerned that a brain stem test was not one which could reliably lead to a determination of death.
After Friday's hearing, Barts Health NHS Trust spokesperson said: "This is an incredibly sad situation and our thoughts and sympathies are with Archie and his family at this time.
"Following the decision that brain stem testing is in Archie's best interests, we will now take steps to arrange the testing to take place next week as directed by the court."