The contrasting views emerged in arguments over a federal court order forcing the nation's largest state prison system to cut its inmate population by some 40,000 to fix longtime problems with inadequate medical and mental health care.
The justices seemed divided along ideological lines, with conservatives appearing sympathetic to California's arguments and liberals sharply questioning its position. Conservatives have a slight majority on the court.
The court took the case under advisement after the arguments and is expected to issue a ruling by June.
The case involves two-class action lawsuits filed in federal court by inmates who challenged the health care conditions in California state prisons in 1990 and 2001. A trial began in 2008 and a three-judge federal panel ruled against the state last year.
Improving conditions in California's prisons has become a major legal, political and budget issue in view of the state's budget crisis and high unemployment.
Carter Phillips, the attorney representing the state, said the lower court had violated federal law by failing to give sufficient weight to the potential adverse on public safety of cutting the prison population.
"I guarantee you that there is going to be more crime and people are going to die on the streets of California," he said.
California's 33 adult prisons were designed to hold about 80,000 inmates but currently hold about 145,000. The state has lowered its prison population through changes in parole and sentencing policies and by transferring inmates to private prisons in other states.