On Thursday, a three-judge federal panel put its foot down with California Gov. Jerry Brown, telling him that the state must release almost 10,000 inmates to relieve prison overcrowding before the end of this year. The governor and the state of California could be held in contempt if they fail to comply with the order.

California, the country's most populous state, has been under a court-imposed order to reduce its inmate population since 2009. Prison overcrowding is believed to be causing inadequacies in medical treatment and diagnosis, as well as mental healthcare. The 2009 order to reduce the state's prison population was upheld by the U.S. Supreme Court on appeal in 2011.

Earlier this year, the state once again petitioned the court to vacate the order, saying that it had fixed the inmate population issue. Back in April, Deborah Hoffman, a spokeswoman for the California Department of Corrections and Rehabilitation, said the state had taken substantial steps to alleviate the problem. "The truth of the matter is that California has invested more than a billion dollars to transform its prison health care system into one of the best in the country," she said. "Our prisons now provide timely and effective health care to inmates that far exceeds what the Constitution requires."

But a monthly progress report to federal judges just this month found that the state's prisons are at 150-percent capacity, with three prisons at or near 175-percent capacity. As the prison crowding rises, Gov. Brown has promised to seek solutions "shortly." Lawyers say Brown is "drafting legislative language" to reduce the crowding. Judges Thursday said that's not enough, urging the state to take immediate action or face contempt.

"Failure to take such steps or to report on such steps every two weeks shall constitute an act of contempt," the judges said.

The battle to resolve California's prison crowding has spanned over 20 years. In 1990, attorneys for inmates sued because they said they weren't getting proper mental health care. In 2001, inmates sued saying they weren't getting adequate medical care. In that case, a judge ruled that inmates were dying unnecessarily.

"The history of this litigation is of defendants' repeated failure to take the necessary steps to remedy the constitutional violations in its prison system," the order said. "It is defendants' unwillingness to comply with this Court's orders that requires us to order additional relief today."

Don Specter, an attorney for the plaintiffs in the case, said, "The ruling is absolutely essential in order for prisoners to be safe and to get adequate healthcare."

Gov. Brown has not given up. He has vowed to seek an immediate stay of the order, which he called an "unprecedented order to release almost 10,000 inmates by the end of this year."