London(CNN) A transgender man who gave birth with the help of fertility treatment lost his legal fight to be registered as the child's father, rather than its mother, in the UK High Court on Wednesday.

Born female, Freddy McConnell transitioned to become a man and was legally recognized as male when he became pregnant in 2017, giving birth in 2018.

The 32-year-old took legal action after a registrar told him that UK law required people who give birth to be registered as mothers on birth certificates.

This establishes the first legal definition of the term "mother" in English common law.

In ruling with the government, Andrew McFarlane, the president of the High Court's family division, deemed that being a "mother" referred to being pregnant and giving birth, regardless of whether that person, in law, was a man or a woman.

"There is a material difference between a person's gender and their status as a parent," McFarlane ruled.

"Being a 'mother,' whilst hitherto always associated with being female, is the status afforded to a person who undergoes the physical and biological process of carrying a pregnancy and giving birth.

"It is now medically and legally possible for an individual, whose gender is recognized in law as male, to become pregnant and give birth to their child. Whilst that person's gender is 'male,' their parental status, which derives from their biological role in giving birth, is that of 'mother.'"

McConnell, a multimedia journalist for UK newspaper The Guardian, started taking testosterone aged 25 and a year later had surgery to remove breast tissue. In 2016, he stopped taking testosterone and subsequently his menstrual cycle restarted before he became pregnant using sperm from a donor.

A feature-length film called "Seahorse," documented McConnell's journey.

On Twitter, McConnell said he would appeal. "I'm saddened by the court's decision not to allow trans men to be recorded as father or parent on their children's birth certificates," he wrote.

"I fear this decision has distressing implications for many kinds of families. I will seek to appeal and give no more interviews at this stage."

In praising McConnell, the judge said the case was an "important matter of public interest" and that there was a "pressing need" for the UK's legislators to address "square-on" the status of a trans male who has become pregnant and given birth to a child.

Existing legislation and UK and European human rights case law, McFarlane said, did not directly engage with the central question.

McFarlane ruled: "The issue which has most properly and bravely been raised by the claimant in this claim is, at its core, a matter of public policy rather than law. It is an important matter of public interest and a proper cause for public debate."

In July 2019, McFarlane had removed McConnell's right to anonymity after UK media organizations successfully argued that the publicity surrounding McConnell's film and the public interest in the question of how the state recognized parenthood meant his identity should be known.