He spent 27 years in prison for murdering two children. Now a Chinese court has found him not guilty

(CNN)A Chinese man convicted of murdering two children has had his conviction overturned after serving 27 years in prison, in what has been described as one of the longest-serving miscarriages of justice in recent Chinese history.

Zhang Yuhuan, 53, was freed on Tuesday after the Supreme People's Court in eastern Jiangxi province found him "not guilty" on the basis of a lack of sufficient evidence, Chinese state media Global Times reported.
The result came after a long-running legal battle to overturn the conviction, and highlights ongoing issues within China's legal system.
    In 1993, two boys were found dead in the city of Nanchang, Jiangxi province, according to the report. Police suspected the boys' neighbor Zhang of killing them.
    In 1995, Zhang was sentenced to death with a two-year reprieve, meaning his death sentence would be commuted to a life sentence if he didn't commit any other crimes within a two-year period, state-run China Daily reported.
    But Zhang appealed to a higher court, arguing that he was not the killer and claimed that police had tortured him during interrogation, according to the report.
    The higher court ordered a retrial, but that was not held until November 2001, China Daily reported. The intermediate court upheld the original judgment, and a later appeal was rejected.
    Zhang and his family continued to insist that he was innocent -- and finally in March last year, the Jiangxi Supreme People's Court reopened the case, according to the report. On Tuesday, he was found not guilty.
    "After we reviewed the materials, we have found there is no direct evidence that can prove Zhang's conviction. So we accepted the prosecutors' suggestion and have declared Zhang innocent," judge Tian Ganlin was quoted as saying.
    Zhang can now apply for state compensation, Global Times reported.
    According to the China Daily report, Zhang said the wrongful conviction had cost him the best years of his life. His two sons are now married and have their own children.
    "It's hard for the compensation to make up for the damage of the wrongful conviction to me and my family, but I still hope to get compensated quickly to repair my house and care for my mother," Zhang said.

    Criminal justice

    For years, human rights advocates have criticized China's legal system, alleging that it allows unfair trials, torture and other ill-treatment in detention.
    China has made attempts to reform its legal system. According to the Global Times report, China officially adopted the legal principle of "innocent until proven guilty" in 1996.
    In 2013, an influential Communist Party legal commission