A woman who was forced to adopt her own child after a legal blunder has won the right to be recognised as their parent.
Sarah Osborne, who was in a same sex relationship, was refused permission to be named as a parent on the birth certificate after a Cambridge registrar said "there could only be one mother".
The High Court has now revoked the adoption order and quashed the original birth certificate.
Cambridgeshire County Council said it recognised the impact of the events.
Ms Osborne had been told she would have to adopt the child.
Speaking after the ruling, Ms Osborne, 48, said she was "delighted, and look forward to being registered, as I always have been, as the parent of my child".
The law at the time of the birth, in 2014, was clear that same-sex female couples who have a child through IVF - and who consented to being treated as a parent - should be named on the child's birth certificate.
But when Ms Osborne and her partner, Helen Arnold, went to register the birth at Cambridge Register Office, she was told she could not be put on the birth certificate.
The registrar said that unless Sarah was the father, and she "clearly isn't", then her name could not be put on the birth certificate.
"The disrespectful, indignant and flippant attitude of the registrar made me feel stupid for asking or expecting to be named as a parent," said Sarah, "as if I was a random stranger off the street."
The family were told that Sarah had to carry out a "step-parent" adoption when the child was 6 months old.
Several meetings with social workers were arranged in 2015 as they assessed her suitability to be a parent.
She was told that adopting a child "was not to be taken lightly" and had to complete a criminal records check and apply for a court order, which was granted in November 2015.
It wasn't until the couple had a second child in 2018, and Ms Osborne was registered as the parent, that they realised that something was wrong. "Sarah should never have had to adopt our child," said Helen.
"We have always been our child's mothers and it is outrageous that we have been through the painful and humiliating process of Sarah having to adopt."
The family lawyer, Jeremy Ford of The Cambridge Family Law Practice, commended the women on waiving their right to anonymity and "bringing this issue to national attention as there may be other couples who have suffered the same injustice."
A spokesman for Cambridgeshire County Council said: "We hope that today's hearing provides a clear way forward, to allow the necessary legal steps to be taken to achieve a birth registration which names both parties as parents.
"We recognise the impact this has had on the family, and would welcome the opportunity to work with the General Register Office on a review to try and prevent any family or local authority being in a similar situation again."