There's not been a greater escape since Steve McQueen jumped aboard his motorcycle. The state of California has been ordered to release more than 55,000 prison inmates to ease pressure on its ailing penal system.

Federal judges ruled last week that California's 33 adult jails have become so overcrowded that they violate the constitutional rights of inmates, subjecting them to "cruel and unusual" punishment that is causing at least one death a month. Just over a third of the state's 158,000 prisoners must be set free by 2012 to ensure that basic healthcare is provided to those who remain behind, the judges said. The majority will go through early release and parole schemes.

Critics claim the ruling amounts to throwing open the doors of the biggest prison system in America, and will endanger the public. California's Attorney General, Jerry Brown, announced an immediate appeal to the Supreme Court, saying: "This order is a blunt instrument that does not recognise the imperatives of public safety, nor the challenges of incarcerating criminals, many of whom are deeply disturbed."

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

Jerry Powers, who heads the state's chief probation officers' association, called it "a game of Russian roulette".

But regardless of their concerns, something needs to be done: California's prison population has increased by nearly 80 per cent since 1990, and its penitentiaries are operating at nearly double their intended capacity of 84,000. A rise in the number of elderly prisoners is also affecting resources; 11 per cent of inmates are aged 50 or over and the average cost of housing a single prisoner is now $46,000 (£32,000) a year.

Building more prisons is not an option, since state finances are in such disarray that public workers are forced to take two unpaid days' leave each month. The state government is running an annual deficit of $12bn.

The prison crisis is not limited to California. In Des Moines, Iowa, county officials plan to start charging prisoners for toilet paper. Michigan, where Detroit has America's highest murder rate, will release 4,000 prisoners who have served their minimum sentences. New Jersey, Carolina and Vermont are putting drug-addicted offenders into treatment rather than prison. Louisiana, which has one of the highest incarceration rates in the developed world, is hoping to reform a system that spends more on prisons than on higher education.

These measures are controversial in a nation that views prison as a place for retribution rather than rehabilitation. Many states have a "three strikes" rule that means relatively petty criminals are given life sentences.