A sharply divided Supreme Court Monday affirmed a controversial prisoner reduction plan forced on California prison administrators that requires the state to reduce its inmate population by tens-of-thousands to ease overcrowding.

The 5-4 decision authored by Justice Anthony Kennedy, a California native, is a wholesale acceptance of a ruling by a special three-judge panel tasked with resolving chronic overcrowding in the state's penal system. The February 2009 decision orders California to reduce its prison population that has at times run nearly double its capacity. Approximately 37,000 to 46,000 inmates will have to be released in order for the state to comply with the ruling.

"After years of litigation, it became apparent that a remedy for the constitutional violations would not be effective absent a reduction in the prison system population," Kennedy wrote in an opinion joined by the court's more liberal members. In an unusual occurrence, the opinion included an appendix showing three pictures of the overcrowded facilities.

Critics of California's prison system contend the cells are so overrun with inmates that proper care has been obliterated. Kennedy cites examples of prisoners with mental or physical health needs having to wait months for inadequate care. He cites one example of an inmate who was held for nearly 24 hours in a cage and standing in a pool of his own urine. Others died while seeking medical attention that was seemingly delayed because of the backlog of cases.

"If a prison deprives prisoners of basic sustenance, including adequate medical care, the courts have a responsibility to remedy the resulting Eighth Amendment violation," Kennedy declared noting the Constitution's prohibition against cruel and unusual punishment.

The ruling gives the state some flexibility when it comes to how it goes about reducing its prison population even suggesting that three judge panel that originally issued the order could extend a two-year compliance order if it felt the state was making progress in its efforts to reduce the inmate population to 137.5 percent of capacity.

While Kennedy recognized the "grave concern" of releasing prisoners in large numbers he nonetheless supported the premise that the state's prisons have simply become too overcrowded.

"Absent compliance through new construction, out-of-state transfers, or other means ... the state will be required to release some number of prisoners before their full sentences have been served."

Justice Antonin Scalia fired away in a dissent joined by Justice Clarence Thomas, calling the ruling a judicial travesty. "Today the court affirms what is perhaps the most radical injunction issued by a court in our nation's history: an order requiring California to release the staggering number of 46,000 convicted criminals."

Scalia, who read part of his dissent from the bench, expressed concern that the ruling upholds the idea that judges can institute their policy preferences in place of elected lawmakers and that the reach of the decision is simply too broad.

"It is also worth noting the peculiarity that the vast majority of inmates most generously rewarded by the release order -- the 46,000 whose incarceration will be ended -- do not form part of any aggrieved class even under the Court’s expansive notion of constitutional violation," Scalia wrote in dissent. "Most of them will not be prisoners with medical conditions or severe mental illness; and many will undoubtedly be fine physical specimens who have developed intimidating muscles pumping iron in the prison gym."

Chief Justice John Roberts joined a separate dissent written by Justice Samuel Alito that also questioned the wisdom of giving federal judges the authority to run state penal systems. Their dissent also faulted the majority for not taking into greater consideration the recent progress of state officials to improve prison conditions and the concerns about public safety.