A woman has won an appeal against a court ruling that would have seen her mentally ill daughter forced to have an abortion.
She appealed a decision made last week granting permission for specialists to end the pregnancy.
Three Court of Appeal judges in London upheld the appeal, overturning the previous decision.
Lord Justice McCombe, Lady Justice King and Lord Justice Peter Jackson will give reasons at a later date.
The judges were told the woman's daughter is in her 20s, is 22 weeks pregnant, and has the mental age of a child aged between the age of six and nine.
She also has a "moderately severe" learning disorder and a mood disorder.
At a hearing in the Court of Protection last week, bosses at a hospital trust responsible for the pregnant woman's care asked Mrs Justice Lieven to let doctors end the pregnancy.
Three specialists - an obstetrician and two psychiatrists - said they believed a termination was the best option.
They said there was a risk to the pregnant woman's psychiatric health if pregnancy continued and they feared her behaviour could pose a risk to a baby.
But her mother - who was against abortion - said she could care for the child.
A social worker who worked with the pregnant woman, who lives in the London area, also said she should give birth, as did lawyers representing her.
But Mrs Justice Lieven ruled that on balance termination was the best option.
She said she had to make an "enormous" decision on the basis of what was in the pregnant woman's best interests.
At Monday's appeal hearing, barristers John McKendrick QC and Victoria Butler-Cole QC, successfully argued that ruling was wrong.