California authorities used the same DNA techniques that led to the capture of the suspected Golden State Killer to free a man who spent about 15 years in prison after being wrongfully convicted in the slaying of his housemate.

Ricky Davis was ordered released from custody during an emotional court hearing in Placerville, near Sacramento, on Thursday, after authorities used extended DNA links developed through publicly available genealogical websites to build a family tree that led to the arrest of a new suspect in the killing of his housemate.

Hours later a smiling Davis walked out of El Dorado county jail surrounded by family and friends.

When asked by reporters to comment on his release he answered “no comment, thank you”, and held up a black sweatshirt embroidered with a yellow Innocence Project logo.

Davis, 54, had always maintained his innocence.

The El Dorado county district attorney, Vern Pierson, would not go into detail on the newly implicated suspect, who was a juvenile at the time of the slaying and by law must make at least his first appearances in juvenile court even though he is now in his 50s, but said he was one of three young men who had been with the victim’s teenage daughter on the night of the slaying.

Pierson said the developments are “two of the most dramatic extremes that you can experience”.

“On the one hand, we have the system working in the worst possible way. On the other hand, we have the evolution of technology in terms of genetic genealogy” that led to Davis being freed and a new suspect arrested this week, he said. “It is a surreal thing in a sense.”

The same DNA techniques in 2018 identified former police officer Joseph DeAngelo as the suspected Golden State Killer, who is now awaiting trial for numerous homicides and rapes across California in the 1970s and 1980s.

It has since been used to find suspects in nearly 80 cases nationwide, said Anne Marie Schubert, the district attorney in neighboring Sacramento county whose office made the DNA link in both cases. But it’s only the second time the new technique has exonerated a suspect, the first being last year in Idaho when Christopher Tapp was cleared of the 1996 murder of Angie Dodge, she said.

“It must be remembered that this is not a tool of conviction, it is a tool of justice,” Schubert said.

Jane Hylton, a 54-year-old columnist for the Foothills Times, was found dead – stabbed 29 times and bitten on the shoulder – on 7 July 7 1985 inside an El Dorado Hills home. She was staying there temporarily with her teenage daughter, Davis and Davis’s then girlfriend, Connie Dahl.

The man arrested this week was one of three youths who were in a park that night with the then-13-year-old daughter of the victim.

One of the three boys is now dead and another is cooperating in the investigation, Pierson said. That man is not believed to have participated in the slaying, but may have known about it afterward, he said. The daughter is not a suspect and helped identify the new suspect, he said.

Davis and Dahl told detectives they had gone to a party the night before and returned home at 3.30am where they found Hylton’s daughter waiting outside. The teenager told them she had gone out with a group of boys that night and was afraid her mother would be upset with her for being out too late, according to an online synopsis of the case by the Innocence Project, which is part of the Santa Clara University School of Law.

“The three entered the house together. Davis saw blood in the hallway outside the master bedroom and found Hylton’s body on the bed. Davis and Dahl immediately called 911 to report the crime. All three maintained they were not involved in the murder and did not know who committed the crime,” according to the project.

The case went unsolved until detectives reopened it in late 1999.

Dahl changed her story under what Pierson said were the aggressive interrogation techniques in use at the time, implicating Davis as the killer and telling detectives that she bit the victim during the attack. He said the two investigators have since retired.

More sophisticated recent DNA tests found unknown male DNA on the nightgown in the area of the bite mark and the same DNA profile under the victim’s fingernails. Those tests excluded Davis, Dahl and Hylton’s daughter as the sources of the DNA.

That led to Davis’s murder conviction being overturned in 2019 after project lawyers argued that “had the original jury heard the DNA results, it would have likely reached a different outcome”. He remained in jail until investigators were satisfied they had the real killer in custody.

Dahl, who received a one-year county jail sentence in the case, died in 2014.

Innocence Project staff attorney Melissa O’Connell said she thought she had the evidence to free her client in 2014, yet it took six more years before investigators were satisfied that they had found the real killer.

She said she was in tears and her client was emotional in court as he was ordered freed. He planned to celebrate with pizza and will be entitled to more than $750,000 in state compensation because he was wrongfully convicted, $140 for each day he spent behind bars.

A prosecutor shook Davis’s hand, she said, and “he got to hug his mom for the first time in court today in a very, very long time”.