People suffering from gender dysphoria in Japan must be sterilized before they can change official documents to reflect the gender of their choosing rather than biological sex.

A panel of judges unanimously upheld a ruling Wednesday stating that individuals identifying as transgender must have “no reproductive glands or reproductive glands that have permanently lost function,” if they seek to change official records displaying sex, Agence France-Presse (AFP) reported.

Four judges upheld the decision, ruling that the law was constitutional. The law also insists that persons wishing to change official documentation must look like the gender with which they identify. Transgender persons seeking document changes must have “a body which appears to have parts that resemble the genital organs of those of the opposite gender,” the law states, according to AFP.

Wednesday’s decision comes after Japanese man Takakito Usui sued over the law’s requirements. Usui is biologically male but identifies as female. He is seeking documentation that reflects his gender choice.

The law is meant to protect parent-child relationships that might otherwise cause “confusion” in society, according to the judges, AFP reported. (RELATED: Record Number Of Children Identifying As Transgender In U.K.)

While the decision was unanimous, presiding justice Mamoru Miura issued an additional opinion casting doubt on the court’s decision. The law may not violate Japan’s constitution, but “doubts are undeniably emerging,” according to Miura, The Daily Mail reported.

The judges acknowledged that the decision is aggressive and that the court should continue to examine the decision.

A person holds up a flag during rally to protest the Trump administration’s reported transgender proposal to narrow the definition of gender to male or female at birth, at City Hall in New York City, U.S., October 24, 2018. REUTERS/Brendan McDermid

“Suffering related to gender, felt by people with gender identity disorder, is also the problem of society as a whole, which should encompass the diversity of sexual identity,” Miura wrote in the additional opinion, according to AFP.

Usui’s lawyer, Tomoyasu Oyama, was incredulous at the decision. “In this day and age, I can’t believe there is a law that requires people to have surgery,” Oyama told AFP.

The decision comes after the U.S. Supreme Court ruled Tuesday that President Donald Trump can temporarily enforce restrictions banning transgender persons from serving in the military.

Follow Grace on Twitter.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.