Charlie Gard has died after his life-support was withdrawn soon after he was moved to a hospice, denying his parents their "final wish" for him to spend his final hours at home.
The little boy's parents, Chris Gard and Connie Yates, had asked for more time with their son after he was transferred from Great Ormond Street Hospital, but High Court judge Mr Justice Francis said doctors could stop providing treatment shortly after 11-month-old arrived at the hospice.
An order issued by court officials on Thursday and drawn up by the judge set out arrangements for Charlie's final hours, which would "inevitably result in Charlie's death within a short period thereafter".
The couple had said previously they did not expect Charlie to survive until his first birthday on August 4.
Ms Yates hit out at Great Ormond Street Hospital, which she said had "denied us our final wish".
"We just want some peace with our son - no hospital, no lawyers, no courts, no media - just quality time with Charlie away from everything to say goodbye to him in the most loving way," she said in a statement.
"I'm shocked that after all we've been through, they won't allow us this extra time."
A hospital spokeswoman said GOSH had "tried absolutely everything" to accommodate the couple's wishes, but "the risk of an unplanned and chaotic end to Charlie's life is an unthinkable outcome for all concerned and would rob his parents of precious last moments with him".
The statement concluded: "Our thoughts and deepest sympathies go out to Chris and Connie, and we hope that their privacy is respected at this devastating time for their family."
Mr Justice Francis has drawn five months of litigation to a close by making the order, which saw Charlie leave the London hospital where he has been cared for since late 2016 and moved to a hospice.
The hospital statement added: "We deeply regret that profound and heartfelt differences between Charlie's doctors and his parents have had to be played out in court over such a protracted period.
The statement said it had been a "distressing process for all concerned", adding that nobody could fault Charlie's parents for tirelessly advocating "for what they sincerely believed was right for their son".
Doctors at Great Ormond Street and Charlie's parents had initially disagreed over whether Charlie, who suffers from a rare genetic condition, should be allowed to travel to the United States for a therapy trial.
Mr Justice Francis in April ruled in favour of the hospital which said the therapy was experimental and would not help Charlie. He said Charlie should be allowed to die with dignity.
Charlie's parents subsequently failed to overturn his ruling in the High Court, Court of Appeal and Supreme Court in London. They also failed to persuade European Court of Human Rights judges to intervene.
The couple then became involved in a dispute over the way Charlie's life should end, initially requesting he be given life support treatment at home for about a week.
The couple then asked if he could be given life support treatment in a hospice for a similar period of time. Great Ormond Street doctors said life support treatment should end shortly after he moved to a hospice.
Ms Gard read a statement during an earlier hearing in the Family Division of the High Court.
"We are now going to spend our last precious moments with our son Charlie, who unfortunately won't make his first birthday in just under two weeks' time," she said.
"Mummy and Daddy love you so much Charlie, we always have and we always will and we are so sorry that we couldn't save you.
"Sweet dreams baby. Sleep tight our beautiful little boy."