The Tokyo District Court ordered the government to pay ¥1.5 million ($9,750) in damages Thursday after finding that medical care provided to a 23-year-old male inmate at a juvenile detention facility in the city of Saitama had been “grossly unsatisfactory.”

According to the ruling, the inmate had been serving time for robbery resulting in injury and other charges at the Kawagoe juvenile prison’s Saitama detention branch when a doctor outside the facility diagnosed him with testicular cancer in March 2020.

He underwent surgery to remove the tumor, but the cancer had already metastasized throughout his body. His sentence was then suspended, and he was admitted to a civilian hospital, where he died in July 2021.