A High Court judge has approved a plan that will see Charlie Gard "inevitably" die shortly after being moved to a hospice and having life-support treatment withdrawn.
Mr Justice Francis had set a timetable to govern the final period of the little boy's life.
Doctors at Great Ormond Street Hospital and Charlie's parents Chris Gard and Connie Yates disagreed over how long he should receive life-support treatment.
Medics said he should move to a hospice soon and life-support treatment should end shortly after his arrival.
His parents wanted more time with him and said he should receive life-support treatment for a number of days.
The judge yesterday made public details of an order which will result in Charlie dying shortly after moving to a hospice.
Mr Justice Francis had said on Wednesday, following the latest in a series of High Court hearings, that Great Ormond Street's plan would take effect if agreement could not be reached by noon yesterday.
The judge's order says it is in Charlie's best interests for life-support treatment to be withdrawn. It says Charlie should receive palliative care.
The order says Charlie will continue to be treated at Great Ormond Street for a "period" of time before being moved to the hospice, which cannot be named for legal reasons.
It says doctors can then withdraw "artificial ventilation" after a "period" of time.
The order says everyone involved agrees that the "arrangements" will "inevitably result in Charlie's death within a short period thereafter".
Mr Justice Francis's written four-page order formally rubber-stamps arrangements put in place during a hearing in the Family Division of the High Court on Wednesday.
The order was issued by court officials after the noon deadline set by the judge passed without agreement.
It outlines arrangements for the end of Charlie's life.
The judge has ruled that the hospice Charlie will be taken to cannot be identified. He also says hospice staff caring for Charlie cannot be identified.
His order does not say when Charlie will be moved and does not specify when life support treatment will be withdrawn.
Charlie's parents became embroiled in the new fight with doctors over end-of-life arrangements earlier this week, a day after abandoning attempts to persuade the judge to let their son travel to America for experimental treatment.