The Yokohama District Court on Thursday sentenced a 37-year-old man to 19 years in prison for abandoning a 5-year-old son who died of starvation while he continued to receive child allowance payments for years afterward.

Yukihiro Saito denied his son Riku sufficient food and water from around the fall of 2006, and left him to die of malnutrition at their apartment in Atsugi, Kanagawa Prefecture, in January 2007, according to the ruling handed down in a lay judge trial.

Saito left his son's body at the apartment, where more than seven years later police found the boy's skeletal remains in May 2014.

"The boy was left to die in an uncomfortable environment filled with garbage without being given food by his father who was the only person he could rely on," presiding judge Koji Inaba said. "The cruelty is beyond all imagination."

Saito told police his wife left him in 2004 and he locked the boy up in the apartment when he went out. He denied intending to kill the boy.

The ruling also said Saito did not tell his employer about his son's death and swindled ¥410,000 ($3,400) in child allowance payments.

Prosecutors charged him with murder and fraud and sought 20 years in prison.

The incident called into question local authorities' failure to keep track of the boy for such a long time, exposing shortcomings in the system and how a child could disappear unnoticed.