A Pennsylvania DJ pleaded guilty Tuesday to the 1992 rape and murder of a schoolteacher, linked to the crime decades after the fact because of DNA his half-sister submitted to a genealogy database.

The accused, Raymond Charles Rowe, 50, was sentenced to life without parole in the case.

Rowe was charged in June with killing 25-year-old elementary schoolteacher Christy Mirack in her Lancaster apartment, just four days before Christmas 27 years ago.

According to investigators, Mirack was getting ready to leave her home to distribute gifts to her students and co-workers when Rowe forced his way in.

DNA EVIDENCE LEADS POLICE TO CHARGE IOWA MAN WITH 1979 MURDER OF 18-YEAR-OLD WOMAN

Prosecutors say she was badly beaten by a wooden cutting board found near her body. She had a broken jaw; an autopsy report revealed wounds on her neck, back, chest and face. The young teacher also appeared to have been strangled using her own sweater.

Mirack was discovered by her school’s principal, who went to check on her after she hadn’t shown up for work and wasn’t answering phone calls.

Investigators struggled for years to find Mirack’s killer but they caught a lucky break last year.

In this June 25, 2018, file photo, Lancaster County District Attorney Craig Stedman announces charges in a 1992 cold case killing during a news conference at the Lancaster County Courthouse in Pennsylvania.(AP Photo/Mark Scolforo)

Using a publicly available genealogical database, authorities found that DNA recovered from the carpet in the victim’s home matched that of the then-unknown suspect’s half-sister, leading them to Rowe, who had lived four 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 samples.

MASSACHUSETTS MAN WHO CONFESSED TO MURDER GRANTED NEW TRIAL AFTER 33 YEARS

"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 Tuesday’s hearing.

"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," he continued.

CLICK HERE TO GET THE FOX NEWS APP

Rowe, known professionally as DJ Freez, likely passed Mirack’s home on his way to work at the time of the murder. Prosecutors say they aren’t sure if the two knew each other or why she was targeted.

The Associated Press contributed to this report.