A judge has given doctors permission to perform an abortion on a woman who suffered brain damage as a result of being attacked.
Mr Justice Baker ruled on Friday that specialists could lawfully terminate the pregnancy after concluding that the woman had not wanted to keep the baby.
The judge analysed the case at a public hearing in the specialist Court of Protection - where issues relating to sick and vulnerable people are considered - in London.
He had decided that the woman lacked the mental capacity to make decisions about medical treatment.
The judge said the woman - who is 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.
She had said she did not want a baby by the man in the "current circumstances" and had intended to have an abortion, Mr Justice Baker was told.
The judge said the evidence was clear.
And he said 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.
She said the woman had told her shortly before the attack that 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 woman) told a number of people she didn't intend to keep the baby," he said.
"She said she didn't want to have (the baby) by her current partner in the circumstances."
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 said it would be lawful for doctors to carry out a surgical abortion and lawful to use "proportionate force" if necessary.