A transgender Texan child will live in joint custody with her two divorced parents—one who believes she’s a girl and one who believes she’s a boy, a judge ruled Thursday.

On its face, Thursday’s court ruling between Texan exes Jeffrey Younger and Anne Georgulas is the last step in a child custody battle. But Younger and Georgulas’ legal fight over one of their children has made the case a rallying point for conservatives, and Thursday’s decision comes after a slew of prominent politicians waded into the case and picked sides. Georgulas, who was awarded sole custody earlier this month, says her 7-year-old daughter Luna is transgender. Younger, who appealed the ruling and won a surprise victory on Thursday, says the child is not transgender, and is a male named James.

Although the Thursday ruling only dictated who got custody and a say in the child’s medical decisions, it’s widely seen as a win for conservative media and politicians who have framed the case as a debate over how (or if) children can come out as transgender.

Luna was assigned male at birth, but began indicating an interest in identifying as a girl when she was as young as three, her father claims. Three mental health professionals who evaluated Luna diagnosed her with gender dysphoria, a condition in which a person’s assigned sex at birth does not match their gender identity. In a 2018 ruling, a judge ordered both parents to treat Luna in a manner consistent with how she had previously identified in school, where she went by Luna and identified as a girl. (For this reason, The Daily Beast is referring to Luna with she/her pronouns, even though she is identified otherwise in other media.)

Neither Younger nor a representative for Georgulas returned a request for comment on Thursday.

Younger and Georgulas separated in 2015. In marriage annulment proceedings, a court awarded Georgulas more than $45,000 in damages for a truck Younger fraudulently purchased in his name through her company. Georgulas also accused Younger of fabricating his background before they married. Before Georgulas married him, she said, Younger told her he had been married once, had a significant career in the Marines and served in Iraq, was a professor, and had made six-figure incomes for decades working for Fortune 500 companies. In fact, he had been married twice, did not have a college degree, was briefly a Marine before being removed, and only earned six figures once, in 2000.

A court annulled their marriage in 2016. But even before the formal split, the pair was divided over how to treat their children. Although Luna’s twin brother continued to identify as male, Luna began indicating a preference for girls’ clothes and identifying with female characters as early as her third birthday, Younger claimed on his blog.

Georgulas had Luna evaluated by three mental health professionals who diagnosed her with gender dysphoria, the Texan reported. One of those therapists advised Georgulas on gender affirmation practices. They would not medically intervene with Luna, but would allow her to dress and otherwise identify as a girl. She went by Luna in school, where she presented as female, according to court records.

This kind of non-medical transition is typical for children, said Casey Pick, senior fellow for advocacy and government affairs for The Trevor Project, a crisis intervention organization for LGBTQ young people.

“For children this age experiencing gender dysphoria, parents typically work together with mental health professionals to facilitate a social transition, which can include things like a change in hairstyle or clothing, use of a different name or pronouns, and being socially affirmed in their gender identity,” Pick told The Daily Beast.

But Younger insisted Luna was not transgender, and continued to refer to her as “James.” He launched a website, “SaveJames,” where he argued Georgulas had fabricated Luna’s gender identity. The site currently solicits donations and accuses Georgulas of “abusing” their child. (Georgulas previously accused Younger of domestic violence, of which he was acquitted in 2018.)

Younger uploaded videos of Luna in boys’ clothes, and stated that the child presented as a boy while visiting Younger’s house. Those visits became increasingly charged. The parents were split on longer-lasting decisions, like whether to cut Luna’s hair. A judge ruled that she should maintain a haircut that was reasonable for a boy or girl, but Georgulas accused Younger of repeatedly cutting it very short during visits.

On his website, Younger claims not to be “against” transgender people, but language across the site repeatedly borrows anti-trans tropes. He wrote that he opposes “irreversible” hormone treatments. A dossier on the case available on his website refers to “this crazy transgender world,” and he repeatedly refers to gender-affirming treatments as “chemical castration.” (As experts told the Washington Post, transgender children can take hormone blockers during puberty, although these are not irreversible.)

Rather than practicing gender-affirming behavior now, Younger said he preferred the tactic of “watchful waiting,” which social work professor Katherine Kuvalanka told the Post was “outdated” and could be actively harmful if a parent did not accept the child’s gender identity.

As the custody case moved toward trial earlier this year, it featured increasingly in conservative media, which portrayed it as a case of LGBT rights run amok. Some of the media fallout targeted Georgulas. Conservative blogs and social media users accused her of wanting to “mutilate” her child, a common allegation in anti-trans circles. A Facebook group with a graphically violent name circulated what they claimed was Georgulas’ address and phone number, and encouraged people to leave negative reviews for the office where she works as a pediatrician.

Stories involving transgender children can sometimes be used to present transgender people as a risk to others, Pick said.

“We should never forget that these stories, much as they are often framed as part of a broader culture war, are ultimately about individuals and families who are trying to do the best they can,” she said. “There is no reason to doubt that both of Luna’s parents love her very much. That said, too often we see transgender children framed by anti-transgender advocates as a threat to other children or society, and when that happens, it has a negative effect on the self-worth and health of LGBTQ youth across the country.”

A survey by the Trevor Project this year found that 78 percent of transgender and non-binary youth reported facing discrimination over their gender identity.

Earlier this week, a jury ruled 11-1 to give Georgulas sole custody. But that was before the issue was seized upon by multiple Texan conservatives who tweeted in support of Younger ahead of his appeal.

Texas Governor Greg Abbott, who has a history of transgender-discriminatory legislation, tweeted that the case “is being looked into by the Texas Attorney General’s Office and the Texas Department of Family and Protective Services. #JamesYounger.”

Following Abbott’s tweet, Texas Attorney General Ken Paxton's office got involved, BuzzFeed News first reported. The office sent a letter to the Texas Department of Family and Protective Services, asking the agency to open an investigation into “possible child abuse against seven-year-old James Younger, whose mother has proposed chemically and surgically altering his biological sex based on her belief that he may identify as a girl.” The letter asks the DFPS to “protect the boy in question [from] permanent and potentially irreversible harm by his mother.”

Sen. Ted Cruz tweeted that the case was “horrifying & tragic. For a parent to subject such a young child to life-altering hormone blockers to medically transition their sex is nothing less than child abuse.” In a follow-up tweet, he claimed the child was “a pawn in a left-wing political agenda.”

Rep. Dan Crenshaw also voiced his support for Younger, claiming that a 7-year-old couldn’t understand the decision to accept gender-affirming treatment and that the case was “heartbreaking and sets a horrible precedent.”

After the outcry from conservatives, a Texas judge on Thursday overturned the jury’s decision and awarded both parents joint custody, giving Younger a say in medical decisions.

The ruling came with a gag order for both parents, prohibiting both from speaking about the case, which will mean Younger shuttering his website.

The heated language around the case can be damaging to transgender people, Pick noted.

“It is unfortunate to see this situation being politicized, rather than focusing on what is in the child’s best interest,” she said. “The Trevor Project’s recently released National Survey on LGBTQ Youth Mental Health found that 76% of LGBTQ youth felt that the recent political climate impacted their mental health or sense of self, and when the lives of transgender youth are sensationalized and treated like political footballs, the reality of their personal struggles and needs is lost in the shuffle.”