Doctors have been told they can stop providing life-support treatment to a brain-damaged boy against his parents' wishes.
Specialists at King's College Hospital said giving further intensive care treatment to 11-month-old Isaiah Haastrup was "futile, burdensome and not in his best interests".
They had asked a judge to give them the go-ahead to provide only palliative care.
Isaiah's mother, Takesha Thomas, and father Lanre Haastrup, who are both 36 and from Peckham, south-east London, wanted treatment to continue.
Mr Justice MacDonald on Monday ruled that doctors could stop providing life-support treatment.
The judge, who had analysed evidence at a trial in the Family Division of the High Court in London earlier this month, said he had reached his decision with "profound sadness".
Mr Haastrup said he and Miss Thomas were disappointed and would discuss the judge's ruling with lawyers.
Barrister Fiona Paterson, who represented King's College Hospital NHS Foundation Trust at hearings, had told Mr Justice MacDonald how Isaiah was born at King's College Hospital on February 18 2017 and was severely disabled
She said nobody could understand the pain and suffering Isaiah's parents had endured.
But she said overwhelming medical evidence showed that stopping treatment was in Isaiah's best interests.
Doctors told the judge that Isaiah suffered "catastrophic" brain damage due to being deprived of oxygen at birth.
They said Isaiah was in a low level of consciousness, could not move or breathe independently and was connected to a ventilator.
Doctors said Isaiah did not respond to stimulation.
Mr Justice MacDonald said, in a written ruling, that he had examined Isaiah's best interests from a broad perspective.
"I am satisfied that it is not in his best interests for life-sustaining medical treatment to be continued," said the judge.
"The court cannot imagine the emotional pain that the conclusion of the court will cause to the parents.
"It is my hope that, in due course, the parents will be able to derive some small measure of comfort from the knowledge that they have done all they can for their much-loved and cherished son."
Mr Haastrup said: "We will be speaking to the lawyers to see what they say.
"Of course, one is disappointed."