Charlie Gard's mother yelled in anguish as a High Court judge set a timetable for the end of the terminally-ill baby's life.
Mr Justice Francis said Charlie would move to a hospice if his parents and doctors at Great Ormond Street Hospital in London could not settle a dispute over where he would spend his last days by noon on Thursday.
The judge said life-support treatment would end shortly after Charlie arrived at the hospice.
Connie Yates and Chris Gard wanted to be given time to reach agreement over end-of-life plans for their son.
Ms Yates walked out of what could be the final court hearing in Charlie's case on Wednesday, after the judge said a decision had to be made.
She yelled: "I hope you are happy with yourselves."
Ms Yates and Mr Gard had initially said they wanted 11-month-old Charlie to spend days with them at home before dying.
Great Ormond Street doctors said it was not practical to provide life-support treatment to Charlie at the couple's home for days.
They said a hospice would be a better plan, and they said life-support treatment should end shortly after Charlie arrived at a hospice.
Lawyers representing the couple on Wednesday told Mr Justice Francis about a change of heart.
They said the couple now wanted a move to a hospice.
But they said Charlie's parents were still in dispute with doctors over the detail of hospice care plans.
Grant Armstrong, who led Charlie's parents' legal team, said the couple wanted to privately fund care at a hospice where Charlie could continue to receive life-support treatment for days before being allowed to die.
He said a doctor was ready to help and several Great Ormond Street nurses had volunteered their services.
Great Ormond Street bosses said they were not satisfied that a properly-qualified specialist would be in control under Charlie's parents' plan.
A lawyer in the couple's legal team said discussions about mounting an appeal against Mr Justice Francis's decision not to allow more time were taking place.
Relatives said an appeal had been mounted for a specialist to come forward.
A family friend posted a statement on Facebook saying: "The hospital have set the bar so high that in terms of clinical team for Charlie's end of life nothing seemed good enough for Great Ormond Street.
"The reality is Charlie is very stable, not in pain and rarely needs a doctor.
"It is therefore difficult to understand why Charlie could not die at home.
"All he needs is a ventilator which pumps room air into his lungs.
"It is extraordinarily sad that there's been so much fuss about him dying at home.
"Connie and Chris have conceded a hospice but it was not their first choice.
"They will be devastated they have not been granted their final wishes as parents."
Charlie's parents became embroiled in the new fight with doctors earlier this week, a day after abandoning attempts to persuade the judge to let their son travel to America for experimental treatment.
Mr Gard and Ms Yates, who are in their 30s and come from Bedfont, west London, had asked Mr Justice Francis to rule that Charlie should be allowed to undergo a therapy trial in New York.
Doctors at Great Ormond Street said the therapy would not help. They said 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.
But the couple had recently returned to court, saying they had new evidence, and asked Mr Justice Francis to change his mind.
They abandoned their legal fight on Monday after concluding that Charlie had deteriorated to the ''point of no return''.