A Dallas judge has awarded joint custody to two parents who disagreed over the gender identity of their 7-year-old. The case, which has generated a lot of discussion in Texas, involves a child that was born male, but whose mother believes is a transgender girl.

The judge's joint custody ruling came just days after a jury gave the mother sole conservatorship of the child. In her ruling, Judge Kim Cooks said a "substantial change in circumstances with child or parent," affirmed her decision to award joint custody. The 7-year-old’s mother, Anne Georgulas, is a pediatrician.

In 2018, Georgulas filed a lawsuit in an attempt to modify her custody agreement with her ex- Jeffrey Younger. She wanted him to address the child as a girl both inside and outside the home and to accept the child's gender expressions. Judge Kim Cooks, who denied the request, said Friday that "the Court finds that the State of Texas has no compelling interest to justify such interference."

Despite denying sole custody to the mother, the judge ruled that Georgulas had not made a request to surgically or chemically transition the child's sex or chemically castrate the child, as Younger had alleged. The judge also declared that "there has been no abuse, neglect, or family violence by either parent," but she also ordered both parents to attend family counseling with the child and the child's twin, a boy. Adding that both must agree on issues like medication, surgical and psychological treatment. According to court documents, a parenting coordinator has been appointed to the family.

The judge has also placed a "permanent injunction" on both parents, which prevents them from discussing the case with the media. Younger had previously attempted to draw attention to the case by publishing a blog, appearing in several media interviews and receiving donations of roughly $139,000. The judge ruled that the child "appears comfortable as a male, female, or gender nonspecific."

In response to the jury's decision to grant Georgulas sole custody, Texas Sen. Ted Cruz tweeted: "A 7-year-old child doesn't have the maturity to make profound decisions like this. 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."

In addition, a day before the judge’s ruling, First Assistant Attorney General Jeff Mateer sent a letter to the Texas Department of Family and Protective Services to investigate Younger's claims of abuse. Marissa Gonzales, a spokesperson with the Texas Department of Family and Protective Services, said the department "has begun investigating the allegations," responding to the letter sent by the attorney general on Thursday. "

According to the American Academy of Pediatrics, at around the age of two, children become aware of physical differences between boys and girls, and by three, most identify as one or the other. By four, "Most children have a stable sense of their gender identity," the AAP says on its Healthy Children website.

RELATED: Transgender No Longer Recognized As 'Disorder' By WHO

Meanwhile, as Jeffrey Younger contends with the judge’s gag order, he has commented that he thinks it is "more important for the public to know what's going on with the court than have his child live a private life."