LARGO — A genealogy database has helped investigators crack two 21-year-old rape cases.

Genetic information from distant relatives linked Robert Brian Thomas, 61, to two violent rapes in 1998, one in Indian Rocks Beach and the other in Venice, Pinellas Sheriff Bob Gualtieri announced Monday.

Pinellas detectives arrested Thomas last week in Michigan. Gualtieri held a news conference to discuss the case, the first in Pinellas, Hillsborough and Pasco counties to be solved using a database containing the genetic profiles of millions who submit their DNA, often to decipher their family trees.

“This case demonstrates how evolving science, technology, collaboration among law enforcement agencies and good old-fashioned, boots-on-the-ground-police work come together,” Gualtieri said.

RELATED: Genealogy websites were key to big break in Golden State Killer case

Two other rape cases from the late 1990s, in Sarasota County and Sanibel, had similar circumstances but no DNA to work with, the sheriff said.

The breakthrough marked only the fifth solved case in Florida using the emerging method of genetic sleuthing to investigate cases. It gained notoriety, and raised privacy concerns, last year when authorities used genealogy websites to find the infamous Golden State Killer, who terrorized California in the 1970s and 1980s.

Robert Brian Thomas, 61, of Michigan, has been linked to two violent rapes that took place in Indian Rocks Beach and Venice in 1998 thanks to a genealogy database, according to the PInellas County Sheriff's Office. [ Pinellas County Sheriff's Office ]

Thomas’ case was investigated by the Florida Department of Law Enforcement’s year-old genetic genealogy program, the Pinellas County Sheriff’s Office cold case unit and the Venice Police Department. The state program has also helped authorities crack cases in Orlando and Hernando, Seminole and Palm Beach counties.

The investigation wound through dozens of suspects, multiple states, waves of technological advances, and many ups and downs for investigators. Gualtieri gave this timeline of the investigation:

The Indian Rocks Beach rape took place in October 1998, according to the Sheriff’s Office, as a woman in her 20s walked on the beach. A naked man approached her and asked for a cigarette. She ran away, but the man chased her down. He threatened her with a knife and raped her. He then led her to the Gulf of Mexico and made her wash herself.

But the man still left behind DNA.

The practice of collecting DNA was only about five years old at that point. The Sheriff’s Office worked with state analysts to develop a genetic profile of the suspect, but there were no matches from local, state and national databases.

They were, however, able to link it to another 1998 assault that authorities said took place months earlier in Venice.

In that case, a man wearing a mask pried open a window on the first floor of a home while a woman in her 40s slept inside. He put a knife to her ribs and threatened to kill her. He raped her, then forced her to shower. Again, he left behind DNA.

The other two cases without DNA evidence shared circumstances with the beach rape. The first, in Sarasota County, was in 1996. The victim was a girl in her mid-teens. The second, in Sanibel, happened the month after the 1998 Indian Rocks Beach case. Thomas has not been charged in either one, but authorities at the time believed they were committed by the same man. A 2004 Tampa Bay Times article referred to the unknown perpetrator as a “serial rapist.”

After the DNA searches turned up no hits, detectives identified about 90 suspects in the Pinellas and Venice cases. They eventually ruled out all of them. They tried another DNA testing method. That didn’t turn up any leads, either.

In 2017, the Sheriff’s Office assigned the case to Detective Chris Lyons of the cold case unit, who met with Venice police. Investigators there had fingerprints. Lyons submitted them for analysis, which turned up a name. Detectives thought they were onto something.

They obtained the potential suspect’s DNA through a search warrant and ran it against the evidence from the crimes. No dice.

“We were back to square one,” Gualtieri said.

Enter the state genetic genealogy program. The four-person team accepted the case for analysis in December 2018.

Investigators used a database called GEDmatch that compiles DNA data from multiple genealogy companies, such as 23andMe and Ancestry.com. Users upload their data to the site. It’s primarily for people who want to find relatives by searching across multiple platforms, Gualtieri said, but the company also shares data with law enforcement — if users opt in. It was the same database authorities used to catch the Golden State Killer.

Analysts found a distant match in an Ocala woman, who shared an ancestor at the “great great grandparent level” with the suspect, the sheriff said. Detectives traveled to Ocala and spent hours mapping out her family tree.

At the same time, detectives also found a possible suspect in Sarasota with a history of sexual assault allegations who matched a facial composite from one of the victims. But after obtaining his DNA, he, too, was ruled out.

Interviews with more family members of the Ocala woman helped them narrow their search to one genetic line within the family. That led them to Thomas’ son. The younger Thomas was in prison, so authorities already had his DNA. It didn’t match.

But detectives followed the same line to Thomas’ father, who records showed had lived in Sarasota and Venice around the time of the alleged crimes. He had gone to federal prison on drug charges in 2010, so investigators believed his DNA would also be in a law enforcement database.

And thus came the last hitch in the case: Because of a processing error, the elder Thomas’ DNA was never entered.

Detectives obtained it this month using another route that Gualtieri didn’t elaborate on. On Dec. 10, state investigators reported a match.

They traveled to Michigan on Thursday, where they arrested Thomas on two counts of sexual battery. He is being held in a local jail there and will be extradited to Florida, Gualtieri said.

Pinellas detectives have been in touch with the victim in the Indian Rocks Beach attack, who Gualtieri said is “greatly relieved.” He added: “This brings much deserved justice for her."