Mrs Justice Lieven recently ruled that the woman's pregnancy should be terminated against her wishes after analysing evidence at a hearing in the Court of Protection, where issues relating to people who lack the mental capacity to make decisions are considered, in London.
Three Court of Appeal judges overturned Mrs Justice Lieven's decision a short time later after the woman's mother, a Catholic former midwife, mounted a challenge.
Lord Justice McCombe, Lady Justice King and Lord Justice Peter Jackson, who considered the challenge at a Court of Appeal hearing in London on June 24, published the reasons for their decision on Thursday July 11.
Lady Justice King said many passages of Mrs Justice Lieven's ruling had "made no mention" of the woman's feelings.
"The judge placed emphasis on the fact that (the woman's) wishes were not clear and were not clearly expressed," said Lady Justice King.
"She was entitled to do that but the fact remains that (the woman's) feelings were, as for any person, learning disabled or not, uniquely her own and are not open to the same critique based upon cognitive or expressive ability.
"(The woman's) feelings were important and should have been factored into the balancing exercise."
Lady Justice King said Mrs Justice Lieven had written a "careful and thoughtful" judgment.
But she added: "In the end, the evidence taken as a whole was simply not sufficient to justify the profound invasion of (the woman's) rights represented by the non-consensual termination of this advanced pregnancy."
Lord Justice McCombe and Lord Justice Jackson said they agreed.
Judges heard that the woman, who is in her 20s and more than 20 weeks pregnant, has the mental age of a child aged between six and nine.
They were told that she has been diagnosed with a "moderately severe" learning disorder and a mood disorder.
Mrs Justice Lieven considered the terms of the 1967 Abortion Act and the 2005 Mental Capacity Act before reaching a decision.
Lawyers said they thought the circumstances of the case were unique.
Bosses at an NHS hospital trust responsible for the woman's care had asked Mrs Justice Lieven to let doctors carry out an abortion.
Three specialists, an obstetrician and two psychiatrists said a termination was the best option because of the risk to the woman's psychiatric health if the pregnancy continued.
They said her behaviour could pose a risk to a baby.
They also said the child might have to go into care and that taking a baby away would cause greater psychiatric harm to the woman than terminating her pregnancy.
The woman's mother was against termination and said she could care for the child.
A social worker who works with the woman said the pregnancy should continue.
Lawyers who represented the woman also said she should be allowed to give birth.
But Mrs Justice Lieven, who is based in the Family Division of the High Court, said a balance of evidence showed that termination was the best option.
Judges heard that the "circumstances of the conception" were "unclear" and that a police investigation was ongoing.
They have ruled that the woman, who lives in the London area, cannot be identified in reports of the case.
They also said the NHS hospital trust which asked for a decision, and the council which employs the social worker, cannot be named because publication of their names might create an information jigsaw which could lead to the woman's identity being revealed.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.