A Dallas judge ruled Thursday that a father and mother will maintain joint custody of their children after a long court battle in which a 7-year-old’s gender became a central issue — and a crusade for conservative media and politicians, including Texas’ governor.

The mother, pediatrician Anne Georgulas, says the child is a transgender girl, while the father, Jeffrey Younger, contends the child is male — a case he has made at length on his blog and in interviews. The mother has kept her silence and sought unsuccessfully to have the court file sealed. The News is withholding the 7-year-old’s name to help protect the child’s privacy.

Gov. Greg Abbott, U.S. Sen. Ted Cruz, U.S. Rep. Dan Crenshaw, and other politicians have latched on to reports in conservative media highlighting the father’s contention that the mother intended to force the child to undergo hormone therapy and puberty blockers to change the child’s biological gender.

In her ruling Thursday, Judge Kim Cooks noted there was never an order for the child to undergo such treatment.

Additionally, records show that Georgulas asked the court to require mutual written consent, which would ensure she and Younger agree on a course of action before the child undergoes any such treatment. Her request also noted the child “is not yet at the age where treatment with hormonal expressions, puberty blockers, and/or transgendered reassignment surgery is medically considered.”

Cooks’ ruling to maintain joint custody comes days after a jury had recommended giving Georgulas sole custody of the child.

Abbott posted Wednesday on Twitter that the state’s attorney general’s office and the Texas Department of Family and Protective Services would look into the case.

The attorney general’s office issued a letter Thursday afternoon to Family and Protective Services urging the agency to investigate the child’s case for possible abuse.

The agency confirmed it had received the letter from the attorney general’s office and was reviewing the allegations. The letter was signed by First Assistant Attorney General Jeff Mateer, who has referred to transgender children as “Satan’s spawn” and evidence of “Satan’s plan.”

“The children at the center of this dispute are in immediate and irrevocable danger,” Mateer’s letter said. “We ask that you open an investigation into this matter as soon as possible and act pursuant to your emergency powers to protect the boy in question [from] permanent and potentially irreversible harm by his mother.”

The judge ruled Thursday there was never any abuse of the children but ordered that the family undergo therapy with their children because of trauma they may have faced due to the publicity surrounding the case.

The judge’s custody decision came after Cruz weighed in on the debate Wednesday, saying the child is too young to decide which gender to identify as.

“A 7-year-old child doesn’t have the maturity to make profound decisions like this,” he said on Twitter. “The state of Texas should protect this child’s right to choose — as an informed, mature person — and not be used as a pawn in a left-wing political agenda.”

An attorney for Younger did not return calls for comment, and previous attempts to reach the mother were unsuccessful.

But her lawyers said Wednesday in a written statement to The Dallas Morning News that media coverage has exploited the case and the child.

Georgulas has received threats because of the coverage, attorneys Jessica Janicek and Laura Hayes said.

“The ruling issued by a jury of peers, after hearing both sides of this case, should call into question the distorted and untrue version of events that has been circulated,” the statement said. “[Georgulas] is being viciously attacked and threatened by complete strangers based on false and untrue statements. That is unacceptable.”

On Thursday, the judge prohibited both parents from commenting publicly on the case until the children are 18.

Younger and Georgulas, who were married in 2010, had twins, including the child at the center of the controversy. They filed for divorce in 2015.

Records show that the couple’s marriage was annulled in 2016 after a court ruled Younger had misled Georgulas into marriage through fraud.

She said he fabricated details of his life, such as his military background, education, work experience and how many times he’d been married before. He denies misrepresenting his past.

At the time of the annulment, a court gave Georgulas and Younger joint conservatorship of the twins. The mother had the right to make decisions about the children’s medical and psychological treatment, among other issues, provided she notified Younger.

She filed a lawsuit in 2018 in an effort to modify the joint custody agreement, after she said one of the twins is transgender and presenting as a girl at school and in public.

Georgulas wanted Younger to affirm the child’s gender identity and wanted to modify his custody of the child if he failed to do so, according to the lawsuit.

She said Younger engaged in “emotionally abusive behavior” toward the child in response to the new gender identity, according to court records.

Younger – who contends the child always presents as a boy around him – started an online campaign over his concerns that the child could be forced into gender transition treatment.

He filed a counterpetition asking for sole conservatorship, but the jury sided with Georgulas on Monday, essentially recommending she have exclusive custody and control over the children’s medical treatment.

Cooks said in her ruling Thursday that both parents will need to consent to those decisions. Additionally, Younger will not be required to identify the child as a girl, as Georgulas wanted.

But the judge admonished Younger for bringing media attention to the case. She said the father had legitimate concerns at first but later courted controversy “at the cost of protection and privacy of his children.”

Younger has received about $130,000 in donations from his publicity campaign, Cooks said.