Doctors should not resuscitate a premature baby girl if she stops breathing, the High Court has ruled.
11-month-old Charlotte has serious heart and lung problems
The parents of Charlotte Wyatt, who weighed just one pound and has serious heart and lung problems, had argued that doctors should revive her.
But Mr Justice Hedley sided with Portsmouth Hospitals NHS Trust, which had said her quality of life would be so poor she should not be treated.
He said further "aggressive" treatment was not in the interests of the child.
"I know that may mean that she may die earlier than otherwise she might have done, but in my judgment the moment of her death will only be slightly advanced.
"I have asked myself: what can now be done to benefit Charlotte?"
He said she should be given three things.
"As much comfort as possible, as much time as possible to spend in the presence and in contact with her parents and she should be allowed to meet her end, in the words of Mr Wyatt, with the TLC of those who love her the most."
He said he had considered allowing doctors to do a tracheostomy - the insertion of a breathing tube through the throat - but had decided against it.
And he added: "I am only too aware of my own limitations in making so momentous a decision."
The couple's solicitor Richard Stein said the parents would not be appealing.
He said: "As you will appreciate, Darren and Debbie Wyatt are extremely upset following the judgment handed down this afternoon.
"They have asked me to say that they feel it was most important that the issues in the case have been aired in public because as a result everyone has had an opportunity to consider the extremely difficult issues faced by them and numerous other parents in their position."
Through their lawyer, the couple thanked the public for the support they have received.
Doctors told the court during a two-day hearing last week that Charlotte, who has been in hospital since her birth, will not survive beyond infancy because her lungs are so severely damaged.
She was born when her mother was 26 weeks pregnant and is fed through a tube as she cannot suck from a bottle.
She also needs a constant supply of oxygen.
David Lock, counsel for the hospital, part of the Portsmouth Hospitals NHS Trust, told the court last week a doctor had said she was "living in a plastic box" and that her life would be "dominated by pain and suffering".
But Charlotte's parents, both committed Christians, argued that, as she has survived this far, she must be given every assistance to help her live.
Mr Wyatt, 33, told the judge: "When you get to the stage when you grow to love someone, you can't just
throw them away like a bad egg and say you will get a different egg."
He conceded that he would have to change his mind if the time came when the baby was really suffering.
At a preliminary hearing, the parents stressed that they maintained a good relationship with the trust.
Dr Michael Wilks, chairman of the BMA's Ethics Committee, said: "The BMA is confident that Mr Justice Hedley, after having heard all relevant information, has made the right decision in the best interests of Charlotte Wyatt."
And Pat Forsyth, of Portsmouth Hospitals NHS Trust, said: "This has been a matter of what treatment is in the best interests of an extremely ill baby, not a case of either party winning or losing."
Nuala Scarisbrick, of the pro-life charity Life, said the "right decision" had been taken for the "wrong reasons".
She added: "Instead of admitting that they had failed, the doctors talked mainly about her "quality of life" being so wretched that she was better off dead. That is quite unacceptable."