Two Italian police officers Carabinieri Alessio di Bernardo and Raffaele d’Alessandro have been sentenced to 12 years in jail over the fatal beating of a 31-year-old man, Stefano Cucchi in custody in 2009, in a case that has gripped the country.

Alessio di Bernardo and Raffaele d’Alessandro, members of the carabinieri, the Italian military police, were both found guilty of the involuntary manslaughter of Stefano Cucchi, who was arrested in a Rome park on 15 October 2009 after being found in possession of about 20g of hashish and three packets of cocaine.

A week later, Cucchi was found dead in his room at Rome’s Sandro Pertini hospital, where he had been taken for treatment for injuries including two fractured vertebrae and a broken jaw. He weighed 37kg at the time of his death, and photos of his gaunt appearance and bruised eyes shocked Italians.

In October 2014, a judge acquitted the officers owing to a lack of evidence. A wall of silence from the authorities meant it was impossible to determine who was responsible for his death. But Italy’s supreme court of cassation in Rome reopened the case in December 2015 and a new trial began.

The turning point came in October last year, when another police officer who was being investigated for the murder began to collaborate with prosecutors, confessing the details of the killing.

Francesco Tedesco who was also charged with the murder of Cucchi but cleared of wrongdoing on Thursday – told a courtroom in Rome that his colleagues had kicked and punched Cucchi in the face, causing his death. Tedesco also alleged that he had been threatened by officials who told him to keep quiet and conceal his report about the incident.

“I apologise to the Cucchi family,” Tedesco told the court at the time. “The last few years have been an insurmountable wall for me. It was not easy to inform against my colleagues.”

Cucchi’s sister, Ilaria, who has fought a long battle to uncover the truth about the incident, was in court for the verdict. “Stefano was killed. We knew that and we’ve been repeating it for 10 years,” she said afterwards. “Now perhaps my brother can rest in peace.”

The case inspired On My Skin, a film by Alessio Cremonini that won three David di Donatello awards, the Italian equivalent of the Oscars.

A visibly moved carabiniere officer, who was not among those on trial, kissed Ilaria’s hand after the verdict. “I did it because justice has finally been served after all these years,” he said before escorting Cucchi’s parents out of the courtroom. He did not want to give his name.