A popular American DJ has pleaded guilty to raping and strangling a schoolteacher in 1992 – after he was identified as a suspect from DNA that a relative had submitted to a genealogy database.

Raymond Charles Rowe, known as DJ Freez, apologized in court for killing the 25-year-old elementary school teacher Christy Mirack at her apartment in Lancaster, Pennsylvania, more than two decades ago. He was sentenced to life without parole, avoiding the chance of the death penalty as a result of admitting the crime.

Last year a serial murderer in California, known as the Golden State Killer, was caught in similar circumstances, via commercial DNA sleuths.

“I’m sorry, sir, to the family,” the 50-year-old Rowe said on Tuesday in court as he faced Mirack’s relatives. “I can’t imagine what you’re going through.”

The case had stymied investigators until authorities working with DNA from the crime scene used a publicly available genealogical database to identify a half-sister of the then-unknown suspect. This led them to Rowe, who had lived just miles from where the killing occurred.

Undercover detectives obtained DNA from Rowe by collecting his used water bottle and chewing gum at a school where he was DJing last year. It matched DNA recovered from the carpet in the victim’s home.

“If not for the grace of modern technology and divine intervention, you probably would have stayed in Lancaster and basked in your fame,” the teacher’s brother, Vince Mirack, told the defendant during the hearing.

He said the killing, which occurred four days before Christmas, destroyed his family’s sense of security and their love of the Christmas holiday. “But most of all you took our Christy,” he said.

“I can only hope that the remainder of your life is as painful to you as the last 26 years have been to my family,” Vince Mirack said.

The teacher’s roommate had left their apartment about 15 minutes before Rowe arrived and forced his way inside, investigators said. She had her coat and gloves on, with plans to give Christmas presents that day to students and co-workers.

“She was surprised and actually fought for her life, and unfortunately failed,” district attorney Craig Stedman said.

Mirack was badly beaten and was probably strangled.

Prosecutors said they are not sure whether Rowe and Mirack knew each other or why he targeted her.

Rowe lived about four miles from Mirack in 1992, and the prosecutor said Mirack’s home was on a likely route between Rowe’s home and where he worked at the time.

His vehicle back then, a white Toyota, matched one that witnesses had seen at the apartment complex that morning.

An online biography for Rowe said he was a breakdancer in the 1980s, won local DJ battles and then hosted dance parties at Lancaster’s Chameleon Club. His site lists events he has worked in New York and regular gigs on local radio stations.