Yulia Savinovskikh, a 40-year-old mother in the Russian city of Yekaterinburg, was born a woman. Her passport says she’s a woman. She is married to a man, has never had sex-reassignment surgery, and publicly insists she is a woman.

This evidence of her gender, however, was not enough to convince a local court, which this month rejected her bid to have two foster children returned to her care. The court concluded Savinovskikh wants to be a man, noting that Russia doesn't recognize same-sex marriage.

The bizarre case, which grabbed national headlines after child-protective services removed the boys from the home of Savinovskikh and her husband in August, comes amid what rights activists call mounting discrimination against Russia’s lesbian, gay, bisexual, and transgender (LGBT) community in recent years.

Savinovskikh said the two young boys were taken away because authorities believed she intended to undergo sex-reassignment surgery, citing her previous breast-reduction surgery and a pseudonymous blog she wrote from the perspective of a transgender person.

Officials at the time gave vague answers to justify the move.

But a report by the Public Chamber, a Kremlin-appointed oversight body, also found that social services feared a possible sex change by Savinovskikh could impede a “traditional” moral upbringing for the children.

A February 5 ruling by a Yekaterinburg court rejecting Savinovskikh’s bid to have the boys returned to her, whom she and her husband were preparing to adopt, appeared to confirm that finding.

Citing Russia’s ban on same-sex marriage, the court said Savinovskikh’s “identification” as a “representative of the male gender -- taking into account her marriage to a man, her desire to assume the social role typical of the male gender -- in essence contradicts the principles of our country’s family law, traditions, and mentality of our society.”

The excerpt of the ruling was posted on Facebook on February 12 by Savinovskikh’s lawyer, Aleksei Bushmakov, who said he could not provide a full copy of the ruling because it was issued in a closed court hearing.

Under international human rights law, the authorities should act in the children’s best interests.... The children clearly thrived in Savinovskikh’s care.”

He told RFE/RL that he had never seen anything like it in Russian jurisprudence.

“It’s an absurd ruling. We were ready for anything but this,” Bushmakov said.

‘I Didn’t Plan To Grow A Penis’

Savinovskikh says she had the breast-reduction surgery to make her life more comfortable after having three biological children.

“I didn’t plan to grow a penis. I didn’t plan to take hormones,” she said in an earlier interview with Current Time TV, a Russian-language network run by RFE/RL jointly with VOA. “All I wanted to do was get rid of an unsightly chest. And it’s my business what I do with my body.”

Savinovskikh says she began writing the transgender-themed blog after becoming interested in the subject.

“It resonated in my soul, because there is a male and female beginning in every person,” she told journalist and current Russian presidential candidate Ksenia Sobchak in an interview last month.

In any event, an adoptive parent’s gender “is simply irrelevant,” said Tatyana Lokshina, a Moscow-based senior researcher for Human Rights Watch (HRW), which has followed the case. She said the court’s ruling “appears absurd and discriminatory.”

“Under international human rights law, the authorities should act in the children’s best interests, not putting children in an institution but rather having them in a family based environment,” Lokshina told RFE/RL on February 13. “The children clearly thrived in Savinovskikh’s care.”

International rights watchdogs have accused the Kremlin of fostering a climate of discrimination and hate toward sexual minorities since the beginning of President Vladimir Putin's third term in 2012, including with a 2013 law banning the spread of "propaganda of nontraditional sexual relations" among minors.

Putin and other Russian officials have said the law is aimed at protecting children and encouraging Russia’s birth rate.

One recent move by the government, however, has been welcomed by transgender-rights activists.

Russia’s Health Ministry last month issued a decree that they say eases bureaucracy and other hurdles concerning gender recognition.

Savinovskikh and Bushmakov say they are preparing to appeal the ruling.

She said in a television interview on February 13 that in her meetings with child-protection services, officials had no issue with the way she cared for the foster children but rather “with my personal life.”

“I’m not going to let them control that,” she said. “My right to a personal life is guaranteed by the constitution.”