A Northern California man who had sexually assaulted two women in 1997 was arrested earlier this month after his DNA retrieved from a discarded Baskin-Robbins spoon matched the two cases.

Police were able to recognize Gregory Vien, 60, of Livermore with the help of genetic genealogy, an advanced investigative tool that has helped solve major cold cases in the past. Genetic genealogy compares the DNA evidence with those voluntarily uploaded in the public database and the suspect is identified through the family members.

Vien was arraigned on Nov. 7 on sexual assault charges and will return to court to enter a plea on Wednesday.

In May 1997, a 41-year-old woman was dragged to a secluded area in Union City in California, where she was unclothed with a knife and sexually assaulted. The suspect's DNA was obtained from her clothes.

Four months later in September 1997, another 22-year-old woman was attacked and sexually assaulted near Livermore High School. The DNA retrieved from the scene matched that of the first attack.

Both the samples were uploaded to the national law enforcement database CODIS (Combined DNA Index System), but no match was found.

Vien continued to live freely in Livermore for 20 years until genetic genealogy indicated his involvement in the cases. He was surveilled by the police and a discarded Baskin-Robbins spoon was collected for forensic analysis. He was arrested on Nov. 5 after the swab test connected him to both cases. His DNA, from the night he was arrested, also matched those found at the two crime scenes.

"For over 20 years, the survivors of these sexual assaults have lived with the constant uncertainty that comes with not knowing when, if ever, their assailant will be identified and brought to justice," Union City police Detective Joshua Clubb said in a statement.

A DNA testing kit; part of the research was compiled by volunteers who had signed up through commercial DNA testing company 23andMe
A DNA testing kit; part of the research was compiled by volunteers who had signed up through commercial DNA testing company 23andMe AFP / Eric BARADAT