California has been ordered to release nearly 10,000 inmates by the end of the year to resolve a notorious overcrowding problem that's been brewing for decades.

The Golden State's prison crisis reached a fever pitch in 2011 after the Supreme Court said the overcrowding amounted to "cruel and unusual punishment." Now all eyes are on liberal Gov. Jerry Brown, who insists the public's safety will be jeopardized if he releases the inmates.

The mass release would only bring prisons down to 137% of their capacity.

So how did California's prisons get to be so dreadfully overcrowded in the first place?

The state actually had a reputation for an ultra-progressive penal system before 1980, according to the radio documentary "Prisons in Crisis: A State of Emergency In California."

Then California began aggressively increasing sentencing in the late 1980s and 1990s in response to nationwide fear about high crime rates. Several high-profile crimes by parolees including the murder of 12-year-old Polly Klauss stoked fear in California, according to "Prisons in Crisis."

California enacted more than 1,000 laws that increased sentencing in a five-year span to settle these fears, law professor Jonathan Simon told "Prisons in Crisis" producer JoAnn Marr.

"Legislators were competing with each other to see who could be tougher," Marr reported. "Any politician seen as being soft on crime ran the risk of losing his seat."

Once the state started getting tougher on crime, it began doing away with many of its reform programs including education and work training, criminologist Joan Petersilia told Marr. These days, prisoners get released without any skills and often end up back in prison on parole violations. Nearly 65% of California's inmates go back to prison again within just three years.

"We play catch and release," Petersilia told Marr.

The California prison population reached a high of 173,000 by 2007, up from about 20,000 in the mid-1970s. New prison construction just couldn't keep up with that growth.

To be sure, Brown has taken some steps to cut back on the state's exploding prison population. Since the Supreme Court ordered the state to reduce its prison capacity in 2011, the state has managed to reduce its prison population to 120,000.

But a three-judge panel of federal judges ruled in June that wasn't enough.

"We are compelled to enforce the Federal Constitution and to enforce the constitutional rights of all persons," the panel wrote, "including prisoners."