A bitterly divided Supreme Court, citing "needless suffering and death" in California prisons, upheld on Monday a court order requiring the state to cut its prison population by an estimated 40,000 prisoners within two years to ease overcrowding.