Daniel Nyqvist confessed killing an eight-year-old boy and a 56-year old woman shortly after his arrest in June.
Nyqvist, who was found to have “committed the acts under the influence of a severe psychological disorder” was sentenced to psychiatric care.
The two victims, unrelated to each other, were stabbed one morning in the quiet town of Linköping.
Investigators struggled to come up with either a suspect or a motive, despite finding the suspect's DNA at the scene, the murder weapon, a bloody cap and witness descriptions of a young man with blond hair.
Police even called upon the FBI for help, but to no avail. Over the years, the case file grew to become the second biggest in Sweden's history, after that of the 1986 murder of Prime Minister Olof Palme.
(article continues below)
See also on The Local:
The case was finally cracked when new legislation in January 2019 allowed police to search for DNA matches of not only the perpetrator but also family members.
After exhausting the police's own DNA database they started looking on commercial genealogy websites, which are popular among Swedes seeking long-lost relatives.
“We received a match almost immediately. And several months later, the suspect was arrested. His DNA was taken and matched 100 percent,” police said in a statement the day after his arrest.
Aged 21 at the time of the murders, Nyqvist has spoken about having obsessive thoughts about killing and said that he chose his victims randomly.
The young boy was selected as Nyqvist saw him as an easy target and after stabbing the child he went after the woman, who had been passing and had witnessed the attack.
An unemployed loner who liked to play computer games, Nyqvist seldom ventured out of his parents' house, where he was living at the time of the murders.
According to investigators, he continued to live a secluded life near Linköping since the killings.