A judge ruled Thursday that Jeffrey Younger, whose young son is reportedly being transitioned into a girl, will have joint guardianship with his son’s mother, granting him the right to share medical decisions for the child.

7-year-old James Younger has been in the middle of a high-profile custody battle between Jeffrey Younger and his ex-wife, Dr. Anne Georgulas, a pediatrician accused of diagnosing their son with “gender-dysphoria,” which is a psychological disorder characterized by a child’s “consistent and insistent” expression of “cross-gender statements and behaviors.”

The ruling, handed down by Family District Court Judge Kim Cooks, comes after a jury decided Monday against Jeffrey Younger’s attempt to prevent Dr. Georgulas from placing their son on puberty blockers and cross-sex hormones as part of the transition process. The jury said Dr. Georgulas had the right to “transition” her son, who she has reportedly renamed “Luna.”

As part of Thursday’s ruling, Judge Cooks also placed a gag order Jeffrey Younger to prevent him from discussing the case with the media and said he no longer must pay for attorney fees.

Jeffrey Younger emerged from the Texas courtroom with a smile on his face and when asked if he was happy about the judge’s ruling, he could be heard saying “yes” before being ushered away.

Constance Stanton, a family friend of Jeffrey Younger, told reporters that “prayers have been answered” regarding the ruling.

The development comes after Texas Gov. Greg Abbott (R) announced that his state is investigating the status of James Younger. “FYI the matter of 7 year old James Younger is being looked into by the Texas Attorney General’s Office and the Texas Department of Family and Protective Services,” Abbott wrote on Twitter Wednesday evening.

The case has garnered widespread attention from other Texas conservatives, including Sen. Ted Cruz (R) and Rep. Dan Crenshaw (R), who expressed concern about the young boy.

Cruz wrote on Twitter Wednesday: “This is 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.”

“This is heartbreaking and sets a horrible precedent,” Crenshaw said of the matter this week. “A 7-year-old can’t possibly make this decision or understand it. Parents should know better. I hope this father receives the public support he needs.”