Doctors can stop providing life-support treatment to ill baby Charlie Gard, Court of Appeal judges have ruled.
Charlie's parents appealed against a ruling made last month that would allow specialists to move their eight-month-old son to palliative care.
Chris Gard and Connie Yates had raised £1.3m to send him to the US for a trial treatment.
Doctors argued continuing life-support treatment would not benefit Charlie but "prolong the process of dying".
Charlie has a disorder called mitochondrial depletion syndrome, which affects the genetic building blocks that give energy to cells.
Great Ormond Street Hospital said the baby was unable to see, hear, make a noise or move.
Last month, High Court judge Mr Justice Francis concluded that life-support treatment should end and said Charlie should be allowed die with dignity.
He said he had made the decision with the "heaviest of hearts" but with "complete conviction" for Charlie's best interests.
Charlie's parents, from Bedfont, west London, had asked three Court of Appeal judges to overturn Mr Justice Francis's decision.
But Lord Justice McFarlane, Lady Justice King and Lord Justice Sales, who analysed evidence at a hearing in London on Tuesday, have upheld the ruling.
BBC News correspondent Helena Lee, at the Court of Appeal
Charlie's parents, Connie Yates and Chris Gard, sat at the front of the court to hear the judgement.
Both waited quietly and patiently.
There was an unexpected hour's delay to proceedings.
Lord Justice McFarlane told the court he would first tell them his and the other two judges decision and then give their reasons.
Their appeal he said was to be dismissed.
Chris Gard looked down and shook his head.
At the back of the court family members broke down.
It looks like Charlie's parents may now take their case to the Supreme Court, or at least that's their wish.
But time is of essence.
Charlie remains in intensive care in hospital where he's spent much of his young life.
The barrister for Great Ormond Street confirmed treatment wouldn't be withdrawn over the Bank Holiday weekend.
This has been a court case where there are no winners.
Richard Gordon QC, who led Charlie's parents' legal team, told appeal judges that they "wish to exhaust all possible options".
"This court should not stand in the way of their only remaining hope."
He said judges should not interfere with parents' exercise of parental rights and added: "What is really at stake in this case is the State, on a massive scale, intruding in your right to private and family life."
The hospital said Charlie was "a terminally-ill child" whose health was "deteriorating day by day".
A spokesman said: "We explored the request to use a therapy that had not been used before and sought independent, international medical opinions on what would represent the best possible treatment for Charlie.
"The medical and legal consensus, confirmed by today's ruling, is that it is in Charlie's best interests to be allowed to die with dignity."
Lord Justice McFarlane praised Charlie's parents' composure and dignity throughout the case and said: "My heart goes out to them."
But he suggested that the couple's criticisms of Mr Justice Francis's ruling were ill-founded.
He said Mr Justice Francis had based decisions on "the core evidence".
Lord Justice McFarlane added that a trip to America for a therapy trial "would expose Charlie to harm" and said there had been a "100% child focused" investigation.
But lawyers representing the couple told the judges that they would like the Supreme Court to consider the case.
The barrister for Great Ormond Street said hospital clinicians felt they were "at the borders of what is ethical" but confirmed treatment would not be withdrawn over the Bank Holiday weekend.