A woman who suffered brain damage after being attacked is expected to have an abortion soon after a judge in a specialist court gave doctors permission to terminate her pregnancy.
Mr Justice Baker ruled an abortion would be lawful because evidence showed the woman had not wanted to keep the baby.
He also said it would be lawful for medics to use "proportionate force" if necessary.
The judge made the ruling late on Friday after analysing the case at a public hearing in the Court of Protection - where issues relating to sick and vulnerable people are considered - in London.
He decided the woman lacked the mental capacity to make decisions about medical treatment.
The judge said the woman, who is aged in her early 30s, could not be identified.
He said bosses at a hospital trust based in the east of England had asked for a ruling.
Mr Justice Baker heard the woman, who has two children, had allegedly been assaulted by her former partner.
The man had been arrested and was in custody.
Their relationship had become "characterised" by domestic violence - allegedly perpetrated by the man, the judge heard.
She had become pregnant by him late last year and, before being hurt, she had told a number of people she did not want to keep the baby.
Mr Justice Baker heard she had said she did not want a baby by the man in the "current circumstances" and had intended to have an abortion.
The judge said the evidence was clear and he was "quite satisfied" a termination was in the woman's best interests.
Mr Justice Baker heard evidence from the woman's mother and sister.
Her mother said she was keen for her injured daughter's "voice to be heard".
She told the judge her daughter "would want a termination", and the sister echoed that view and added that the woman had told her shortly before the attack she was planning an abortion and had said she "cannot keep" the baby.
Mr Justice Baker was also told the woman had undergone an abortion before and would have understood the physical and emotional implications.
The judge added: "In my view the evidence is clear and all one way... She expressed her wish to have her pregnancy bought to an end.
"I am quite satisfied that (her) best interests are in authorising termination of her pregnancy by surgery."
The judge said she had expressed a "clear wish" before being hurt and losing the mental capacity to make decisions.
He also said an abortion was in the best interests of her "overall health and welfare".
Mr Justice Baker heard legal argument from barristers Vikram Sachdeva QC and Victoria Butler-Cole, who represented hospital bosses.
Barrister Conrad Hallin represented the interests of the woman.
He had been instructed by the Office of the Official Solicitor, which provides help to sick people involved in litigation.