A UK judge authorized doctors to perform an abortion on a 22-weeks pregnant London woman in her twenties who is believed to have the mental capacity of a child between the ages of 6 and 9.

The woman's family opposed the abortion, but the woman is under the care of a UK National Health Service trust, where doctors argued an abortion would be less traumatic than giving birth.

The case was heard in the Court of Protection, which handles cases concerning individuals who are judged to lack the mental capacity to make decisions for themselves.

Read more stories like this on INSIDER.

A UK judge authorized doctors to perform an abortion on a 22-weeks pregnant London woman in her twenties after deciding it was in the best interest of the woman, whose developmental disabilities and mood disorder are believed to give her the mental capacity of a child between the ages of six and nine.

The woman's family opposed the abortion procedure, but the woman's doctors in a UK National Health Service Trust argued that an abortion would be less traumatic than giving birth, and the judge decided that giving a child up for adoption would cause the woman to "suffer greater trauma."

"I am acutely conscious of the fact that for the state to order a woman to have a termination where it appears that she doesn't want it is an immense intrusion," Justice Nathalie Lieven said in her ruling, according to The Independent. "I have to operate in [her] best interests, not on society's views of termination."'

The case was heard in the Court of Protection, which delivers rulings concerning individuals who are judged to lack the mental capacity to make their own decisions. It ruled the woman in this case could not be publicly named.

Police are currently investigating the circumstances of how the woman became pregnant, but the court only heard they were unclear.

Lawyers for the woman's family and a social worker reportedly contended that the woman's mother would raise the baby with the woman's help, which Lieven objected to because of the woman's psychological limitations.

The woman, who lives with her mother, reportedly objected to the abortion herself, but Lieven said she does not believe the woman understands what it means to have a baby.

"I think she would like to have a baby in the same way she would like to have a nice doll," Lieven said.

Lieven cited her decision as "enormous" and based on "heartbreaking" evidence, along with the 1967 Abortion Act and the 2005 Mental Capacity Act.

Read more: Before Roe v. Wade, desperate women used coat hangers, Coke bottles, Clorox, and sticks in attempted abortions

The 1967 Abortion Act in the UK made abortion legal under most circumstances in England, Wales, and Scotland. Abortion is illegal in Northern Ireland except in cases where pregnancy threatens the life of the mother.

The 2005 Mental Capacity Act says decisions made for those over the age of 16 must be made in their best interests.