Park Jeong-jae, a district court judge in Suwon, south of Seoul, said on Thursday in his ruling on Yoon's case, "It was a wrong verdict based on faulty investigations."
"I, as a member of the judiciary, apologise to the accused that the judiciary had failed to serve its role properly as the last bastion for human rights," he added.
When the verdict was announced, Yoon's supporters exploded into applause and presented him with flowers. Prosecutors decided not to appeal the ruling.
"I hope no more people will be wrongfully accused, as I was," Yoon told reporters Thursday.
For decades, the Hwaseong murders terrorised South Koreans. The victims, ages 7 to 71, were often strangled to death after being raped. Their bodies were found with their mouths stuffed with their own stockings, bras or socks. Some of the bodies were mutilated with umbrellas, forks or razor blades.
"I still don't know why I did what I did," Lee said last month, when he testified during Yoon's retrial. "I wasn't thinking or planning. I committed the crimes like a moth drawn to a flame."
A total of 2 million police officers were mobilised to hunt for the killer over the years, and more than 21,000 men were interrogated in the case. The killings also inspired the 2003 blockbuster movie Memories of Murder.
The cases remained unresolved until last year, when advances in DNA analysis allowed forensic experts to extract samples from some of the evidence collected at the murder scenes. The samples matched Lee's, and he later began confessing to the murders.
During Yoon's retrial, one of the former police detectives who had investigated his case admitted that Yoon had been beaten and deprived of sleep for three days as he was forced into a confession. On Thursday, the court said that the case against Yoon had been built upon illegal detention and torture and "no reliable evidence."
Lee's confession, however, was "very credible," it said.
The National Police Agency issued a statement Thursday apologising for "stigmatising an innocent young man as a murderer."
"We bow our head deeply in apology for him and his family," it said.
Yoon's lawyers said that the original police investigation had bordered on absurdity: The police argued that Yoon had entered the murdered girl's home by climbing a wall. But when they took him there to re-create the murder scene, Yoon, who suffered from polio as a child and walks with a limp, could not climb the wall.
Yoon's argument that he was tortured into confession was not admissible during his original trial.
When Lee appeared as a witness during Yoon's retrial in November, he, too, testified that the police investigation had been shoddy.
Before he went on his killing spree in 1986, he was questioned by police about a rape but walked free when officers decided not to pursue the case, he said. At one point, he said he had been carrying the watch of one of his victims when police questioned him as part of their investigation into the Hwaseong murders. Again, he walked free.
"I still don't understand how come it has taken so long for them to catch me," Lee, 57, said. "I was questioned by police detectives several times, but they always asked me about my friends and neighbours, but never seriously about me."
Police officers said that Lee may have decided to cooperate with them after the DNA analysis because he no longer faced any additional criminal charges. The 15-year statute of limitations on the last of the Hwaseong murders expired in 2006. But his chances of parole have evaporated.
Lee said he would rather stay in prison than be let out on parole, citing the case of Cho Doo-soon, who was released from prison this month after serving 12 years in prison for the rape of an 8-year-old girl. For months before his release, South Koreans issued death threats against Cho, forcing police to increase security around his home.
"It's not like I haven't thought about what life would be like if I were released on parole," Lee said last month. "But I would rather stay in prison. I have heard how the people were reacting to Cho Doo-soon's release. I can imagine what it would be like if they heard I was coming out."
Written by: Choe Sang-Hun
© 2020 THE NEW YORK TIMES