The parents of British baby Charlie Gard on Monday abandoned their legal fight to take him to the United States for experimental treatment in a case that has attracted global attention.
A lawyer representing Gard's parents Connie Yates and Chris Gard told judge Nicholas Francis at London's High Court that "time had run out" and that they had made their decision after seeing the 11-month-old's latest brain scans.
"We have decided it is no longer in Charlie's best interests to pursue treatment and we will let our son go," Gard said outside court.
"He had a real genuine chance of life. We are truly devastated.
"We are now going to spend our last precious moments with our son, who unfortunately won't make his first birthday in just under two weeks time," he added.
Judge Francis had been due to rule on whether there was enough new evidence to allow the parents to take the baby, who suffers from a rare genetic disorder, to the US for a type of treatment that has never been used on a human being.
Charlie suffers from a rare form of mitochondrial disease, which causes progressive muscle weakness in the heart and other key organs.
British doctors believe Gard's brain damage is "severe and irreversible" and have said the baby "may be suffering".
Great Ormond Street Hospital argued that Gard's illness has left him "deprived of his senses" and that he is "without any awareness" as far as doctors can tell.
"He has no quality of life and no real prospect of any quality of life," the hospital said.
But father Chris Gard criticised the authorities, saying "there is one simple reason why treatment cannot now go ahead, and that is time.
"Had Charlie been given the treatment sooner, he would have had the potential to be a normal, healthy little boy," he said.
"We will have to live with the what-ifs, that will haunt us for the rest of our lives. Our son is an absolute warrior and we will miss him terribly."
The couple fought a long legal fight to allow them to take their child out of London's Great Ormond Street Hospital (GOSH), but lost in both Britain's Supreme Court and the European Court of Human Rights in Strasbourg.
The ruling led to the intervention of both US President Donald Trump and Pope Francis, who offered to help the baby, leading the hospital to ask the courts for a final assessment of any new evidence.
Pope Francis is praying for Charlie and his parents "and feels especially close to them at this time of immense suffering," the Vatican said in a statement.
The latest legal battle saw new testimony from a US neurologist, but a lawyer also warned the boy's parents that latest scans made "sad reading".
In response, Chris Gard shouted "evil", while mother Connie burst into tears.
Dominic Wilkinson, professor of medical ethics at the University of Oxford, told AFP that there needed to be "better ways to avoid cases of disagreement from coming to court".
"This would mean that patients can access early experimental treatment if there is a reasonable chance that it would not cause significant harm," he said.
With emotions running high, the hospital on Saturday said that it had contacted police over a "shocking and disgraceful tide of hostility and disturbance.
"Staff have received abuse both in the street and online," it said.
Mother Connie responded that "we do not, and have not ever, condoned any threatening or abusive remarks towards any staff member", but added that they too had suffered "the most hurtful comments from the public".
Great Ormond Street Hospital said the parents "command GOSH's utmost respect and humble all who work there".
Scores of supporters holding blue balloons gathered outside the court for Monday's hearing, and reacted to the news with anger, chanting: "shame on you, judge" and "shame on GOSH".
Protestor John Howard said "there are no words to describe how disgusting this decision is, it is medical murder."
The parents now want to establish a foundation "for Charlie's voice to be heard," according to their lawyer Grant Armstrong.
Judge Francis paid tribute to the parents "for the love and the care they gave to their child Charlie.
"No parents could have done more for their child," he said.