A hospital trust can withhold life-saving treatment from a severely brain-damaged Muslim man if his condition deteriorates, a court has ruled.
Doctors argued it would be unfair to resuscitate the patient, known as Mr L, if his condition worsened.
His family, of Greater Manchester, said that was against their Muslim faith.
At the Court of Protection, Mr Justice Moylan said it would be lawful to withhold treatment as it would not prolong life "in any meaningful way".
He added: "It would result in death being characterised by a series of harmful interventions without any realistic prospect of such treatment producing any benefit."
Mr L, 55, suffered severe brain damage in July following a third cardiac arrest.
His wife and two of his eight children said his condition was continuing to improve and their religion required everything to be done to prolong life "until God takes it away".
The judge refused the family permission to appeal, although they have the option of asking the Court of Appeal itself to intervene.
Solicitor Julianne Moore, who represented Mr L's family, said the hearing had "given the family the opportunity to put across their views in terms of what they believe L would have wanted on the grounds of how he lived his life and, in particular, his religious beliefs".
"They are devastated at the outcome of the hearing and remain of the view that all attempts should be made to prolong L's life, particularly in view of his uncertain prognosis," she said.
"They consider that it was inappropriate to place a Do Not Resuscitate order in L's notes without informing or consulting his family and that, in view of the uncertainty in relation to his condition, it was premature to do so."
She added that the family also had concerns that "there were failures in the care provided to L whilst a patient at the hospital which may have caused or contributed to his condition" and that she was "advising the family in respect of allegations of medical negligence".
'Unanimous medical opinion'
The case was adjourned part-way through while doctors reassessed Mr L's condition, after new video evidence appeared to show he was no longer in a persistent vegetative state.
Doctors for the Pennine Acute Hospitals Trust agreed there had been a slight improvement but said it would still be unfair to prolong his life.
The trust's medical director Dr Sally Bradley said the "very sad, difficult and complex case" had heard "overwhelming unanimous medical opinion that it would not be in the patient's best interest to intervene and be resuscitated again".
"We believe he will suffer more pain and sustain further damage to his brain [if resuscitated]," she said.
"Importantly, this case has never been about whether the trust should continue to provide care and treatment for the patient, but about the actions and medical interventions that should be taken in the event that his medical condition deteriorates."
She said that during "a very difficult and emotional time for Mr L's family", they had shown "great dignity" and that the trust understood "the family wish to do everything they can in the best interest of their loved one".