DNA links suspect to 1999 cold case murders of 2 Alabama teenage girls, police say J.B. Beasley and Tracie Hawlett were both 17 when they were killed.

Alabama police have linked a suspect to the 1999 cold case murders of two 17-year-old girls using DNA and genetic genealogy.

Investigators identified Coley McCraney, of Dothan, Alabama, in the murders of J.B. Beasley and Tracie Hawlett as the case closed in on two decades without being solved, Ozark Police Chief Marlos Walker told ABC News.

The upcoming 20th anniversary, along with the April 2018 arrest of Golden State Killer suspect Joseph James DeAngelo, prompted the police department to send evidence from the crime scene to Parabon Labs, a Reston, Virginia, company that provides DNA phenotype services, Walker said.

The two teens, students at Northview High school in Dothan, were headed to a party on July 31, 1999, but got lost and ended up about 20 miles northwest in Ozark after they confused the directions, ABC Dothan affiliate WDHN reported.

Hawlett's mother, Carol Roberts, said in 2007 that the girls called her from a gas station, telling her they were on their way home, according to the local station. When they hadn't made it back by dawn, Roberts called police.

At first, there were no signs of foul play when investigators found the black Mazda sedan the teens had been driving by 9 a.m. the next day, WDHN reported. But when they opened the trunk, they found Beasley and Hawlett inside with gunshot wounds to their heads, according to the station.

One of their purses was found in the front of the car with all of her cash and credit cards inside, leading police to believe that the motive was not a robbery, WDHN reported. There is no indication that McCraney knew the teens before they were killed, Walker said.

No one had been arrested in the nearly 20 years since the killings. But a few months before the anniversary, police sent evidence from the crime scene to Parabon.

Genetic genealogy allows law enforcement agencies to identify a potential suspect through his or her family members who voluntarily submit their DNA to a genealogy database, allowing investigators to create a larger family tree than in years past.

After the evidence was analyzed at Parabon, investigators recognized McCraney's last name from the DNA search, Walker said.

Police then brought the 45-year-old in for a DNA swab, the police chief added, and it matched the evidence collected at the crime scene.

McCraney was arrested Friday and charged with multiple counts of capital murder as well as first-degree rape, online jail records show. Walker said he was not considered a suspect in 1999 and had been under investigators' radar.

It was not clear Sunday if McCraney had an attorney. He is being held at the Dale County jail without bond, according to his jail records.

ABC News' Emily Shapiro contributed to this report.