DNA obtained from an accused cyberstalker has led to his arrest in the Texas slaying of a 21-year-old woman 17 years ago.

Andy Castillo, 57, was accused Friday of killing Cynthia Palacio in Lubbock in July 2003, leaving her partially nude body by the side of a rural road.

Authorities said Palacio, the mother of a 2-year-old girl, had been strangled.

KWTX-TV reports that Castillo was arrested and jailed in January on charges of cyberstalking real estate agents in the Waco area with lewd messages and threats to rape their children.

PHOENIX GIRL'S DISAPPEARANCE NEARLY 20 YEARS AGO LEADS TO ARREST OF STEPDAD ON MURDER CHARGE

Authorities said they believe Castillo cyberstalked other real estate agents in 20 cities and 10 states, the station reported.

After the arrest, deputies took DNA from Castillo with his consent.

That DNA matched DNA taken from the Palacios crime scene, Lubbock County Sheriff Kelly Rowe said at a news conference Friday.

SEATTLE-AREA MAN, 62, HELD AFTER DISCOVERY OF COUPLE'S REMAINS INSIDE SUITCASE: AUTHORITIES

He said investigators had worked hard to bring closure to Palacio's family.

“This is why we kind of shudder at the term ‘cold case,’” Rowe said.

The sheriff said Castillo's rap sheet includes "lots of charges" for violence against women.

He said investigators were seeking to confirm Castillo's link to the murder of Linda Carbajal, 21, in New Deal, Texas, in 2004.

CLICK HERE TO GET THE FOX NEWS APP

“If we’re able to confirm that through the same type of DNA test that we were able to do with Ms. Palacio, then ... we will make that announcement and file those charges,” Rowe said.