Dying Charlie Gard's heartbroken parents screamed "no" and sobbed as a judge decided his life support can be switched off to let him "die with dignity".
Devastated Chris Gard and Connie Yates broke down as they lost their battle to keep the 8-month-old, who has a rare genetic condition, alive, reports news.com.au
The couple, from West London, said the youngster should be sent to the US for experimental treatment that could extend his life.
But judges at the High Court went against their wishes on Tuesday, instead ruling his life support machine can be turned off.
The couple said they were devastated by the decision and were struggling to understand why the judge didn't give him the chance of treatment.
Medics at Great Ormond Street Hospital had argued it was time to stop providing treatment for little Charlie and move him onto a palliative care routine.
One specialist claimed it was not tolerable to leave Charlie as he is and he found it hard to see how the infant could benefit from any treatment.
Justice Francis ruled that life-support treatment should stop after analysing the evidence at a hearing in the Family Division of the High Court in London.
Doctors in the US had offered to try a procedure called nucleoside bypass therapy on Charlie.
But the judge said experts agreed it could not reverse Charlie's brain damage, and that experimentation might benefit medical science but could not benefit the youngster.
"It is with the heaviest of hearts, but with complete conviction for Charlie's best interests, that I find it is in Charlie's best interests that I accede to these applications and rule that GOSH may lawfully withdraw all treatment save for palliative care to permit Charlie to die with dignity," he said.
Chris Gard, who had tucked his dying son's toy monkey into the top pocket of his grey suit, cried "no" and covered his face with his hands as he heard the judge's decision.
Justice Francis continued: "Most importantly of all, I want to thank Charlie's parents for their brave and dignified campaign on his behalf, but more than anything to pay tribute to their absolute dedication to their wonderful boy, from the day that he was born."
Speaking after they were dealt the devastating blow, the couple's lawyer Laura Hobey-Hamsher said: "Connie and Chris are facing every parents' worse nightmare. They are struggling to understand why the court has not at least given Charlie the chance of treatment in America."
The couple could now take their battle to the Supreme Court for appeal, but haven't indicated if this will be their next step.
Charlie was born on August 4, 2016 with a form of mitochondrial disease, which causes progressive muscle weakness.
His mum spends 18 hours a day with the boy and would not accept he was in pain - instead insisting "he enjoys tickles".
The boy's parents had set up a GoFundMe appeal to raise the £1.2 million ($2.16m) needed to send Charlie to the US. More than 80,000 pledged cash, including celebrities such as Charlotte Crosby.
Yates thanked those who had supported the campaign and addressed her son directly.
"Charlie we are so immensely proud of you and we hope that we have done you proud by standing by your side and never giving up despite everything we've had to face," she said.
"We've never been so stressed in our lives but we'd do it all again in a heartbeat because you are worth every ounce of pain and every single tear! You're our baby and we are your parents and we will do anything for you!
"We've got the money, we've got our passports, we've got the doctor who's got the medication. All you need is the chance. We won't give up on you because you have a rare disease, it's not your fault, you shouldn't have to die, I'm sorry this has happened to you, I wish I could take your place!! We love you! We will fight for you until the very end and we'll pray that we'll get to hold your warm hand forever."
The care worker had also explained how their "fate boiled down to one person and one day" ahead of the ruling today.
A GoFundMe spokesman said officials would have discussions with Charlie's parents about what would happen to money raised for treatment.
He said: "We'll be speaking privately to the family in the next few days about what they want to do and how we can support them."