When Kelli Rowlette received the results from a DNA sample she had sent to a popular genealogy website, she assumed there had been a mistake.

The test showed that her DNA matched a sample from a doctor more than 500 miles away — and, though she had never heard of him, Ancestry.com predicted a parent-child relationship between the two.

At the time, Rowlette was not aware that more than 36 years ago, her parents had struggled to conceive.

She did not know her mother had undergone artificial insemination, nor did she — or her parents — know her mother’s fertility doctor had allegedly used his own sperm to get her pregnant with Rowlette.

The account comes from a lawsuit filed last week in U.S. District Court in Idaho. In it, Rowlette accused Gerald E. Mortimer, a now-retired obstetrician gynecologist in Idaho Falls, of fraud and medical negligence, among other things.

Mortimer could not immediately be reached for comment, and it’s not clear whether he has an attorney.

In the early 1980s, Rowlette’s parents, Howard Fowler and Sally Ashby, were married and living in Idaho Falls, not far from the Wyoming border.

The pair were having a hard time conceiving. Mortimer, an OB/GYN, diagnosed Fowler with a low sperm count and Ashby with a tipped uterus, in which the uterus tilts toward the spine, according to the lawsuit.

The doctor recommended that Ashby undergo a procedure in which she would be inseminated with sperm from her husband and an anonymous donor who matched the couple’s specifications, the lawsuit states. The couple requested a donor who was in college and taller than 6 feet with brown hair and blue eyes — and Mortimer told them that he had found a donor matching their description, the suit says.

But the lawsuit claims that when Mortimer performed the procedure in summer 1980, he used his own sperm. He did not match the couple’s specifications.

Ashby became pregnant and, in May 1981, Mortimer delivered his own child — never divulging the secret, according to the lawsuit.

Mortimer remained Ashby’s doctor for several years until the she and her husband moved to Washington state.

“Dr. Mortimer cried when Ms. Ashby informed him they were moving,” according to the lawsuit. “Dr. Mortimer knew Kelli Rowlette was his biological daughter but did not disclose this to Ms. Ashby or Mr. Fowler.”

It wasn’t until last year that the decades-long secret started to unravel — when Rowlette sent in a DNA sample and it told her something was off.

In July, Rowlette, from Benton County, Washington, received the notification about the match from Ancestry.com. She told her mother, expressing her “disappointment in the unreliability of the service” — and her mother recognized the doctor’s name, according to the lawsuit.

“Ms. Ashby contacted Mr. Fowler, now her ex-husband, and relayed the information she obtained from Ancestry.com. Mr. Fowler was also devastated by the news,” the lawsuit states, explaining that the parents “painfully labored” over whether they should tell their daughter.

But several months later, Rowlette discovered the shocking truth on her own.

In August, Rowlette was helping to sort through her parents’ old papers when she ran across her birth certificate. It had been signed by the doctor who delivered her — Gerald Mortimer, according to the lawsuit.

The lawsuit states that Rowlette was “horrified” and contacted her parents “in a panic to relay what she had found.”

Following news of the lawsuit, a spokeswoman for Ancestry.com said in a statement Tuesday that DNA testing “helps people make new and powerful discoveries about their family history and identity.”

“We are committed to delivering the most accurate results, however with this, people may learn of unexpected connections,” it read. “With Ancestry, customers maintain ownership and control over their DNA data. Anyone who takes a test can change their DNA matching settings at any time, meaning that if they opt out, their profile and relationship will not be visible to other customers.”

Since the situation came to light, Rowlette and her parents have been “suffering immeasurably,” the lawsuit states.

The family is suing Mortimer, his wife and Obstetrics and Gynecology Associates of Idaho Falls for medical negligence, fraud, battery, negligent infliction of emotional distress and breach of contract.