California investigators tracked down the man they suspect is the Golden State Killer by comparing crime scene DNA to genetic profiles of people who had used genealogy websites to trace their ancestry, allowing them to identify relatives of the suspect, a prosecutor said on Thursday.

Former police officer Joseph James DeAngelo, 72, was arrested on Tuesday outside the Sacramento-area home where he has lived for at least two decades, not far from the site of the first of eight murders he is charged with committing 40 years ago.

DeAngelo, described by neighbours as an oddball and loner known to fly into occasional fits of solitary rage, is suspected of 12 murders. He also is accused of committing 45 rapes and scores of home invasions in a crime spree that spanned 10 years and 10 California counties during the 1970s and 1980s.

Announcing his arrest on Wednesday, authorities said DeAngelo’s name had never surfaced as a suspect before last week, when a DNA match was made.

Officials initially did not disclose how their investigation led to DeAngelo, a former California police officer whose DNA had never previously been collected.

But on Thursday, Steve Grippi, chief deputy district attorney for Sacramento County, said detectives narrowed their search by using genetic information available through commercial genealogy websites furnishing personal family histories to consumers who send DNA samples in for analysis.

Confirming details first reported by the Sacramento Bee newspaper, Grippi said investigators compared DNA samples left by the perpetrator at a crime scene to genetic profiles on the ancestry sites, looking for similarities.

He did not address whether the websites volunteered the information or were subject to a search warrant or subpoena.

Detectives followed the family trees of close matches, seeking blood relatives who fit a rough profile of the killer. The process produced a lead a week ago, pointing to DeAngelo based on his age and whereabouts at the time of the attacks, Grippi said.

Investigators found DeAngelo, placed him under surveillance and obtained his DNA from a discarded object, finding a match to a crime scene sample. A second, more decisive sample was collected from him days later and came back positive on Monday.

Authorities have not disclosed whose DNA helped solve the case. DeAngelo is known to have at least two adult children.

DeAngelo is scheduled to make his first court appearance in Sacramento on Friday, facing two counts of murder.

On Thursday, sheriff’s detectives and FBI agents spent hours combing through his modest single-storey house in Citrus Heights, a Sacramento suburb, and probing the backyard with poles for signs of digging. Red marker flags were visible in an embankment at the rear of the yard, enclosed by a tall wooden fence.

“Those are fairly standard search techniques,” said Lieutenant Paul Belli, a homicide detective for the sheriff’s department. “There’s no reason to believe there are bodies buried back there.”

Among the items of evidence collected from the house were computers and firearms, he said.

Investigators also sought articles of clothing that might help tie the suspect to particular crimes, such as ski masks or gloves worn during the attacks, or jewellery, driver’s licenses and other personal effects taken from victims, apparently as keepsakes or trophies, Belli said.

Belli said he doubted additional victims would emerge because exhaustive DNA database searches had turned up no further matches.

Neighbour Paul Sanchietti, 58, said he was left “bone-chilled” by news that DeAngelo, who lived four houses away, had been arrested as a suspected serial killer.

In the 20 years they lived as neighbours, Sanchietti said he could recount speaking just a few words with DeAngelo on two occasions, once when they pushed a stalled car out of the middle of the street.

“It just felt like he wanted to be left alone,” Sanchietti said of his neighbour, who he said had a reputation in the community for loud, angry outbursts.

“He would be outside in his driveway working on his car or something, and he would go into these really loud tirades, Sanchietti said, adding that he nevertheless was unaware of DeAngelo ever running afoul of law enforcement.