A Japanese court on Friday ruled that only the child born before a trans woman went through her surgical and legal transition could be recognized legally as her child, while the child born after her transition cannot be, media said.

Japan, where many LGBTQ people still do not come out to their families, requires that anybody who wants to legally change their gender have surgery to remove the sexual organs they were born with, a practice sharply criticized by human rights groups.

The trans woman, who was assigned male gender at birth, had two daughters with her female partner using sperm preserved before her transition, NHK and Kyodo reported.

Four years ago she was legally permitted to change her gender on her family register, the reports said.

Though her partner was recognized as the legal mother of the girls due to having given birth to them, the trans woman's request to be recognized as their parent wasn't accepted by a Tokyo family court in February.

That court said "there is currently nothing in Japanese law to recognize her parental rights," a ruling the woman appealed.

On Friday, the Tokyo High Court ruled that she could be recognized as parent of the daughter born before her legal gender change, but not the second, born after.

No further details were immediately available.

Japan remains the only Group of Seven nation not to recognize same-sex marriage.

In June, a Japanese court ruled that a ban on same-sex marriage was not unconstitutional, dealing a setback to LGBTQ rights after a court in 2021 found the opposite.