A British woman who offered to serve as a surrogate mother for a gay couple but chose to keep the child must surrender the baby to its fathers, a UK judge has ruled.

The gay couple met the unnamed woman, who had previously acted as a surrogate, online and she agreed to travel to Cyprus in 2015 to have an embryo transferred into her womb.

She eventually changed her mind about giving up the baby, which is now 18-months-old, and reportedly waited several weeks before telling the two men she had given birth in April 2016.

According to the Independent, the surrogate sent a letter to the couple one day before the child was born telling them that she was going to keep the baby.

The couple filed legal proceedings soon after and a High Court has now ruled that the child should live with its fathers. High Court Justice Lucy Theis said the baby was “better off as a child of gay intended parents living with a genetic parent.”

She criticised the surrogate and her husband for changing their minds and preventing the fathers from establishing a relationship with their child.

The surrogate has no biological connection to the child as the fathers donated sperm paired with an egg from a Spanish donor. Other the next few months, the couple fell out with the woman and her husband, who already had five other children.

As British law doesn’t recognise surrogacy and because there was no adoption order in place, the surrogate and her husband remained the child’s legal mother and father.

This week, however, she lost an appeal and has been ordered to surrender the child but will be allowed to visit the child six times a year.

More stories:
Strictly Come Dancing’s Gorka Marquez strips off and talks fitness with Attitude
Football’s first openly gay referee says game is stuck in the ‘dark ages’ when it comes to homophobia