An Oregon doctor got a big surprise when he submitted his DNA to Ancestry.com — the test revealed he had 17 children he’d known nothing about.

It turned out a fertility clinic may have used his sperm without his permission to father the children — and now he worries he could have even more rugrats running around without his knowledge, he claims in a $5.25 million lawsuit reported by The Oregonian.

Bryce Cleary, now 53, donated his sperm to the Oregon Health & Science University 30 years ago as a medical school student, under an agreement that only allowed for it to be used to conceive five children, he claims in his suit.

“I wanted to help people struggling with infertility and I had faith that OSHU would act in a responsible manner and honor their promises,” Cleary told reporters.

After graduating, Cleary married and had three sons of his own and adopted a daughter. But in March 2018, two sisters contacted Cleary looking for information about their biological dad.

After submitting his DNA to the genealogical website Ancestry.com, Cleary said, he discovered he was the father of those girls — as well as 15 other people.

But “there could be a huge number of kids out there,” he said.

At least two of the offspring conceived through OSHU went to the same schools, church or social activities as the children he had with his wife, Cleary claims.

That means the clinic breached another promise: that Cleary’s sperm would be used only for couples living outside Oregon, in order to lessen the chances the offspring would meet or become romantically involved, states the lawsuit filed in Multnomah County Circuit Court.

“The idea that you can produce that many children from one donor and throw them all in the same region?” Cleary asked. “There has got to be some reforms.”

Also, Cleary said, the clinic was supposed to keep his information private, but didn’t.

All of the promises OSHU allegedly made “were a lie,” Cleary said, adding that his donation was “distributed locally and in a largely irresponsible manner.”

The lawsuit claims Cleary “incurred extreme mental and emotional pain, anguish and suffering, which have all had a significant and negative impact on his personal, parental and marital relationships.”

OSHU said it couldn’t comment on the case for confidentiality reasons.