Charlie Gard's parents said they have been denied their "final wish" after a High Court judge approved a plan which will see the youngster moved to a hospice where his life support treatment will be withdrawn.
An order issued by court officials and drawn up by Mr Justice Francis sets out arrangements for Charlie's final hours, which will "inevitably result in Charlie's death within a short period thereafter".
Chris Gard and Connie Yates had asked for more time with their son after he is transferred to a hospice, but the judge said doctors can stop providing life support treatment shortly after Charlie arrives.
Ms Yates said in a statement: "GOSH (Great Ormond Street Hospital) have 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.
"Most people won't ever have to go through what we have been through, we've had no control over our son's life and no control over our son's death."
She added: "I'm shocked that after all we've been through, they won't allow us this extra time."
The hospital said in a statement: "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.
"It has been a uniquely painful and distressing process for all concerned.
"Charlie's parents have tirelessly advocated for what they sincerely believed was right for their son, and nobody could fault them for doing so.
"All of us at Great Ormond Street Hospital get up every morning to care for sick children, not to cause further anguish to devoted parents like Chris and Connie."
The statement said the hospital 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: "Every single one of us wishes there could have been a less tragic outcome.
"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 will see Charlie leave the London hospital where he has been cared for since late 2016, and move to a hospice.
The judge has not revealed when Charlie will move and has said the hospice cannot be identified in media reports.
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.
Great Ormond Street specialists said the therapy was experimental and would not help and that life support treatment should stop.
Mr Justice Francis in April ruled in favour of Great Ormond Street and 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.
They initially said they wanted Charlie to be given life support treatment at home for about a week before equipment was disconnected.
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.