An American judge known for his harsh and autocratic courtroom manner was jailed for 28 years for conspiring with private prisons to hand young offenders maximum sentences in return for kickbacks amounting to millions of dollars.

Mark Ciavarella Jnr was ordered to pay $1.2m (£770,000) in restitution after he was found to be a “figurehead” in the conspiracy that saw thousands of children unjustly punished in the name of profit in the case that became known as “kids for cash”.

The Pennsylvania Supreme Court has overturned some 4,000 convictions issued by the former Luzerne County judge between 2003 and 2008, claiming he violated the constitutional rights of the juveniles – including the right to legal counsel and the right to intelligently enter a plea. Ciavarella Jnr, 61, was tried and convicted of racketeering charges earlier this year but his lawyers had asked for a “reasonable” sentence, claiming that he had already been punished enough.

Download the new Independent Premium app Sharing the full story, not just the headlines

Federal prosecutors accused Ciavarella Jnr and a second judge, Michael Conahan, of taking more than $2m in bribes from the builder of the PA Child Care and Western PA Child Care detention centres and extorting hundreds of thousands of dollars from the facilities’ co-owner. Ciavarella Jnr filled the beds of the private prisons with children as young as 10, many of them first-time offenders convicted minor crimes.