A New Jersey man has to pay child support to only one of two twin girls — because he didn’t father them both, a judge ruled this week.

In a precedent-setting case that would make even TV host Maury “Who’s the Daddy?” Povich’s head spin, the Passaic County civil case has uncovered a rare medical miracle — and exposed a support-seeking single mom as a fertile philanderer.

The baby-daddy dispute began about 19 months after twin girls — identified as “A.M.” and “B.M.” in court papers — were born in January 2013. The mom, “T.M.,” and a man identified as “A.S.” were in a romantic relationship, according to court papers.

In October 2014, the county’s board of social services filed a child-support petition on the mother’s behalf, naming A.S. as the father of both twins.

But a month later, a DNA test was ordered. The results were shocking.

Petitions naming A.S. as the father were only half-right.

The board of social services is currently providing public assistance to the mother.

“At the time the current action commenced, the mother identified only A.S. as the father of both children,” Superior Court Judge Sohail Mohammed wrote in a diagrammed decision that looked as much like a sexual-education lesson plan as it did a judicial ruling.

At a hearing a few weeks later, the mom shared information she had left out of her petition.

She had had sex with another man within the same week.

To ensure the unusual outcome was indeed correct, the court called in a DNA expert who testified that the two eggs were fertilized from different fathers during the same menstrual cycle.

The expert, Karl-Hanz Wurzinger, cited an academic study he published in 1997 that found that different fathers occurs in about one out of every 13,000 reported paternity cases involving twins.

Mohammed said there is no current recordkeeping on the medical miracle, which is known as heteropaternal superfecundation.

But the phenomenon is believed to be on the increase due to fertility breakthroughs, medical stimulation of ovulation, promiscuity and other factors, Mohammed said.

This is an unprecedented case in New Jersey, and only a handful of reported cases exist nationwide, Mohammed said.

The defendant was ordered to pay $28 per week — for one child.

The second father’s identify has not been established, Mohammed said.