Doctors can perform potentially life-saving cancer surgery on a woman who has a "delusional belief" that she does not have the disease.
A judge at the Court of Protection in London ruled that the treatment would be lawful and in the best interests of the 61-year-old, who suffers from chronic schizophrenia.
Announcing his decision, Mr Justice Holman said: "She has cancer of the uterus. She could be cured by a potentially life-saving operation.
"However, because of other co-morbidities and other factors there is a considerable risk that she could die during the operation or in the post-operative recovery period.
"She herself lacks the capacity to make an informed decision. She denies that she has cancer at all and opposes, and is resistant to, the operation."
The judge added: "The lady's three adult sons all strongly desire that she should have the operation and feel that the potential benefits outweigh the risks."
He said: "The question for the court is whether balancing all the relevant factors it is in her overall best interests to have the operation or not."
The judge was ruling on an application brought under the Mental Capacity Act 2005 by an NHS trust in the south of England, which is responsible for the woman's physical health care, for declarations setting out what treatment would be lawful in her case.
"Everyone in this case is strongly motivated by a desire to prolong and maximise her life," he said.
The woman, who is referred to as K and cannot be named for legal reasons, "utterly denies that she has cancer, she has a "delusional belief that she does not have cancer at all".
As well as her severe mental disorder she is also obese and suffers from diabetes.
Mr Justice Holman said: "If the cancer is not treated, and unless she dies earlier from the other co-morbidities, then it is likely that she will die from the cancer."
He stressed: "No-one, or any court, can order or require any doctor to take any step. The court can only permit it."
Right up to the "last moment" it was a matter for the doctors to decide on whether the treatment would be justified.
The judge granted declarations to the trust, which also cannot be named, that the proposed surgery under general anaesthetic would be lawful "notwithstanding K's refusal to consent to such treatment".
It would also be lawful for sedation to be "administered by, and thereafter continuously monitored by, a qualified anaesthetist" before K is informed that it was proposed to carry out the surgery.
Mr Justice Holman concluded: "Assuming the surgery takes place it is of course my fervent hope that it proceeds as smoothly as possible to a good outcome for Mrs K.
"Like her sons I fully appreciate that it may not. I, like they, have tried to do my very best for her."
Her case is not the first time the Court of Protection has been asked by NHS trusts if a patient’s “best interests” is for them to undergo medical treatment against their wishes.
In the first known case two years ago, a judge ordered that a woman with cancer who had a phobia of hospitals could be forcibly sedated at her home so that she could be taken into theatre and operated on.