Tokyo-Japan’s highest court has upheld a ruling granting a retrial to a man described as the world’s longest-serving death row inmate, a lawyer for the 84-year-old said on Wednesday.

Iwao Hakamada has lived under a death sentence for more than half a century, after being convicted of robbing and murdering his boss, the man’s wife, and their two teenaged children.

But he and his supporters argue that he confessed to the crime after an allegedly brutal police interrogation that included beatings, and that evidence in the case was planted. He tried to retract his confession, but was sentenced to death in 1968, with the verdict confirmed by the Supreme Court in 1980. However, in a rare about-face for Japan’s rigid justice system, a district court in the central city of Shizuoka in 2014 granted his request for a retrial.

The court said investigators could have planted evidence and ordered the former boxer freed, adding it was “unbearably unjust” to keep him detained pending the new trial. Prosecutors appealed that ruling, and won at the Tokyo High Court, prompting Hakamada to move the case to the Supreme Court, which on Wednesday ruled in his favour, backing the retrial.

“The Supreme Court made a decision today to uphold a retrial by overturning the decision by the Tokyo High Court to dismiss the request for retrial,” Hakamada’s lawyer Yoshiyuki Todate wrote on his blog.