A South Korean man who wrongfully spent 20 years in prison for killing a teenager has been cleared of her murder following a high-profile court case that exposed police torture and investigation failures.

Yoon Seong-yeo — now in his 50s — was found not guilty Thursday following a retrial in the northwestern city of Suwon over the 1988 rape and murder of a 13-year-old in her bedroom in Hwaseong, then a rural, undeveloped area near the country’s capital Seoul.

The teenager was one of 10 killed in the area between 1986 and 1991 in a spate of high-profile deaths known as the Hwaseong murders.

Yoon was the only person ever convicted in connection to the killings. He was sentenced to life in prison and ultimately spent 20 years behind bars for the 13-year-old’s rape and murder.

In a verdict released Thursday, judge Park Jeong-je found that police had used torture, including sleep deprivation, and illegal detainment to obtain Yoon’s confession to the 1988 murder.

“As a member of the judiciary, I apologize to the accused, who suffered great physical and mental pain, for the court’s failure to function properly as the last bastion of human rights,” he said. “We sincerely hope that the retrial of this case will be a little consoling and contribute to the restoration of the accused’s honor.”

The result means Yoon’s name is finally cleared — more than 30 years after the murder took place.

t’s also a rare outcome in South Korea, where only a tiny fraction of applications for retrials are accepted, according to experts.

“I’m relieved that the final ruling found me innocent,” Yoon said following the verdict. “I can let down this heavy load I’ve been carrying for 30 years and get some rest.”

Yoon has claimed his innocence for years, but was only granted a retrial after police made a breakthrough in the case last year.

In September, police announced that new DNA evidence linked at least some of the Hwaseong murders to Lee Chun-jae, who has been in prison since 1994 for the rape and murder of his sister-in-law.

The following month, Lee confessed to all 10 of the murders and another four that police did not provide details on.

Coerced confession

At the months-long retrial, Yoon’s lawyers argued that their client — who was a 22-year-old, uneducated repairman with a limp from childhood polio when he was arrested — was coerced by police into confessing.

Yoon told CNN that he was handcuffed in a room for three days, was not allowed to sleep, and barely ate during the interrogation.

In July, Gyeonggi Nambu Provicial Police Agency chief Bae Yong-ju admitted that during the initial investigation in 1989, police assaulted Yoon and coerced him into making a false confession.

“We bow down and apologize to all victims of the crimes of Lee Chun-jae, families of victims, and victims of police investigations, including Yoon,” Bae said, noting others had suffered from “police malpractice” during the initial Hwaseong investigation.

According to Lee Soo-jung, a forensic psychology professor at Kyonggi University, it was common in the 1980s for suspected criminals in South Korea to be kept awake for long periods to extract a confession. Sleep deprivation is considered a form of torture.

In an interview with CNN in November, Korean National Police Agency commissioner general Kim Chang-yong said last year’s police investigation revealed that police had used illegal confinement and incorrect investigation techniques.

He said the decision to reveal past wrongdoing showed police commitment to not making the same mistakes.

“It was a shameful, illegal investigation,” he said. “I believe that it should never happen again and that’s why we need checks and balances. Police are working hard not to repeat past mistakes.”

Cold case solved

For decades, the Hwaseong murders — which were revisited in “Memories of Murder,” a 2003 film by “Parasite” director Bong Joon Ho — remained unsolved. Lee’s confession may have helped bring some closure to the families of the victims.

Kim said police profilers interviewed Lee 52 times over nearly seven months before he admitted to all the crimes he had committed. “He did not confess easily,” Kim said.

On one remarkable session in November during the months-long retrial, Lee took the stand to confess to the killings in front of Yoon.

He said he didn’t know why he hadn’t been a suspect during the initial investigation, and said he had even been questioned by police at the time of the killings when he had a watch belonging to one of the victims on his person.

“I didn’t think the crimes would be buried forever,” Lee said. “I came and testified and described the crimes in hopes for (the victims and their families) to find some comfort when the truth is revealed. I’ll live my life with repent.”

What happens next

Yoon can now seek compensation for the 20 years he spent wrongfully imprisoned. One of Yoon’s lawyers, Park Joon-young, told CNN earlier this year that Yoon could probably expect more than $1 million in compensation.

Yoon has previously told CNN that no amount of money can compensate him for the years he spent in prison and the impact on his reputation and family.

Police are planning to issue a white paper on the Hwaseong case and police failures during the initial investigation. Kim said it is “impossible” to imagine such failings happening now.

There is unlikely to be justice for the families of the Hwaseong victims.

Even though Lee has confessed to the murders, he cannot be prosecuted for the Hwaseong cases as the statute of limitations on those killings has expired.