A Texas jury has ruled against a dad seeking custody of his twin 7-year-old sons in his attempt to stop one of the boys from transitioning his gender.

The Dallas panel denied Jeffrey Younger’s petition for sole custody of sons Jude and James — which came as the boys’ mom is pushing for James to begin hormone-replacement therapy.

The mom, pediatrician Anne Georgulas, contends that James is transgender, likes wearing dresses and prefers to be identified as “Luna,” according to The Texan.

But at stake, potentially, is not just James’ identity in the here and now, but his health down the line.

Hormone therapy can cause infertility, as well as carrying potential health risks ranging from hair loss to blood clots, according to medical professionals.

Georgulas has secured a letter of recommendation for James to “receive a full psychological assessment for gender dysphoria and potentially take hormone blockers,” the Washington Examiner reported. It’s a move that Younger strongly opposes.

The battle landed in the courts when Georgulas filed suit to restrict her ex-husband’s contact with the kids, require that he refer to James as “Luna” — and keep the boy away from those who refused to do the same.

Younger responded by petitioning the court for sole custody of the boys, with expert witnesses testifying that James’ identity is still very much in flux.

“There is still some fluidity in his thinking,” said Dr. Benjamin Albritton, according to the Examiner. “Neither child appears to be depressed, anxious or aggressive . . . [James] gave no indications of other significant psychological difficulties.”

Witnesses on Younger’s behalf included friends who testified that James always goes by “James” and opts for boys’ clothing whenever he’s in the care of his father — even when girls’ clothing is available, according to The Texan.

The testimony was in support of Younger’s contention that any desires James may have to be a girl are not his own, but a product of his mother’s influence.

The jury on Monday ultimately sided with Georgulas, paving the way for her to pursue a possible transition for James.