Updated

A Brazilian judge has sentenced an officer of the Rio de Janeiro state police to 21 years in prison after he confessed to being one of 11 policemen who shot a judge to death.

Court records indicate officer Sergio Costa Junior was initially sentenced Tuesday to 33 1/2 years for murder and racketeering, but the term was reduced because he confessed and is helping the prosecution of the 10 police officers who are facing trial.

Costa Junior testified that he and the 10 officers killed Judge Patricia Acioli in August 2011 because she had ordered the arrest of Costa Junior and five fellow policemen on charges they executed an 18-year-old.

Acioli was investigating Rio de Janeiro's criminal militias, which are largely composed of off-duty police.