SACRAMENTO -- Declaring that California's long-running prison crisis is over, Gov. Jerry Brown on Tuesday challenged a federal court order by saying the state has done all it can to safely relieve overcrowding and improve medical and mental health care for inmates.

Meeting further demands by the courts to reduce the inmate population, he said, would require ignoring state sentencing laws and putting the public at risk by releasing violent offenders. He urged the judges to end court oversight of inmate medical and mental health care, and vowed to press his fight to the U.S. Supreme Court if necessary.

"There's no question that there were big problems in California prisons," the Democratic governor said at a Capitol news conference, adding that "after decades of work, the job is now complete."

Attorneys representing inmates countered that while conditions have improved, inmates still are needlessly dying of neglect and mentally ill inmates still go untreated.

It was those sorts of dismal conditions that prompted mentally ill inmates to sue the state in 1991, eventually leading a panel of federal judges to order the state to reduce the population of its 33 adult prisons -- including two in Vacaville -- by about 33,000 inmates, to a total of 110,000 inmates, by June. The court's 2009 order was upheld by the nation's high court in 2011.

The state won't meet that deadline despite sending thousands of less-serious offenders to local jails instead of state prisons under a 14-month-old state law designed to reduce crowding and prison spending. The change has reduced California's inmate population so much that Texas now has a larger prison population, though Texas has about 12 million fewer residents.

The law alone reduced the prison population by nearly 25,000 inmates. In addition, corrections officials say as many as 2,800 third-strike career criminals could be released after voters required that the third strike be a violent or serious felony.

Brown argued the state can't do more without endangering public safety, and shouldn't have to comply with an arbitrary cap.

Brown's administration said in court documents filed overnight Monday that it could meet the court's current population cap only if the federal court waives numerous state laws and "orders the outright early release of inmates serving prison terms for serious and violent felonies."

That includes granting early release credits to "second strike" inmates who have serious prior convictions. Sentencing laws would have to be changed, and inmates who would normally serve nine months or less in state prison would spend their time in county jails.

The state also could lower the threshold for sending inmates to firefighting camps, expand work furlough, restitution centers and alternative custody programs, and keep more inmates in private prisons in other states.

Attorneys representing inmates' welfare said the state could adopt those money-saving changes without endangering the public.

Brown said such a strategy would not be in the public interest.

"We are not letting them out without a fight," he said during an afternoon news conference in Los Angeles.

Stanford University law professor Joan Petersilia, co-director of the Stanford Criminal Justice Center, expects the judges to reject Brown's challenge, but said the judges would do well to consider the state's improvements as well as the more violent criminals left in state prisons.

"We've kind of let out the low-hanging fruit and this next bunch is a much different group," said Petersilia, who has been studying the transition of lower-level criminals to county jails.

Brown said the state can no longer afford to spend billions of dollars on "gold plate" prisons that could be going to education, child care and other priorities. Salaries soared under a federal overseer with the power to hire and set pay levels, with some prison medical staff paid more than twice the statewide average.

"We've gone on a hiring binge. We've thrown out the civil service book, we've thrown out the salary restrictions. Pay them more than the governor! Do whatever you have to satisfy these problems," Brown said. "Common sense says, 'Enough."'

A federal judge is already moving slowly to end a court-appointed receiver's control of prison medical care because of improved conditions, Brown noted. The administration filed a court motion to also terminate a different judge's oversight of inmate mental health care, arguing in part that further federal involvement tramples on state sovereignty.

Brown ended a 2006 emergency proclamation by former Republican Gov. Arnold Schwarzenegger that let the state send thousands of inmates to private prisons in other states. Brown's move cleared the way for them to be returned to California starting in July.

"California is a powerful state. We can run our own prisons. And by God, let those judges give us our prisons back. We'll run them right," Brown said.