The costly mess that is the California prison system has produced inmate strikes, violence and a Supreme Court ruling that its teeming institutions are unconstitutional. Now it may produce a welcome byproduct: justice.

Last week, the state gave the go-ahead to a proposed ballot initiative to modify California’s “three strikes” law, enabling backers of the initiative to begin gathering the signatures necessary to put it to a vote. Approved by voters in 1994 after the kidnapping and murder of 12-year-old Polly Klaas by a career criminal, the law reflected the public’s frustration with pervasive and seemingly ever-more-violent crime.

Two dozen other states adopted three-strikes laws as well, but none is as indiscriminately punitive as California’s, which allows any felony to qualify as a third strike. The state has imposed sentences of 25 years to life for third strikes such as shoplifting a pair of socks and prying open the door to a church food pantry.

Many of the more than 8,000 prisoners serving third-strike sentences in California are hardened, violent criminals who have earned lengthy terms, or life, behind bars. Their sentences would not be shortened by the ballot initiative. But more than 3,600 third-strikers have committed crimes that were neither violent nor serious. In addition, local prosecutors and judges exercise broad discretion on third-strike sentencing, producing vast disparities among the state’s counties.

The original three-strikes law was written too broadly to provide just punishment in the thousands of circumstances it covers. With the state buckling under the strain of chronic budget deficits and a sagging economy, it is now too expensive to maintain. According to the state auditor, the cost of imprisoning nonviolent three-strikes offenders for 25 years is $4.8 billion. (California will spend roughly $10 billion on prisons this year -- more than it spends on its once-renowned higher education system.) Backers of the initiative say it will save at least tens of millions of dollars a year.

Supporters, backed by the Stanford Three Strikes Project at the university’s law school, will need to collect more than 500,000 signatures just to get the initiative on next November’s ballot. They must also raise millions of dollars to pay for advertising. A ballot initiative to change the law in 2004 was shot down by 53 percent of voters. This latest effort will surely be opposed by the powerful correction-officers union, many California prosecutors (Los Angeles District Attorney Steve Cooley has been a steadfast and courageous exception) and politicians fearful of being labeled soft on crime.

Violent crime in California has declined by more than half since 1990, tracking similar declines in states with three-strikes laws and those without them. (Indeed, there seems to be little or no correlation between levels of violent crime and three-strikes laws.) Changing the law to exempt nonviolent criminals would not make California more dangerous. It would make the state’s justice system more fair, its prisons less crowded and its perennial budget gaps less dire.

Voters seem to recognize that change is overdue. According to a poll in July, 62 percent of Californians now favor reducing life sentences for third-strike property-crime offenders.

To comply with the court order on prison overcrowding, the state is seeking to reduce its prison population from roughly 135,000 inmates to 110,000 two years from now. That will require a kind of triage, with the state releasing thousands of nonviolent convicts in order to ensure that violent criminals remain incarcerated. Repealing three-strikes for nonviolent offenders will help the prison system evolve from cruel and unusual to humane and cost-effective. We hope California voters support the ballot initiative.

To contact the Bloomberg View editorial board: view@bloomberg.net.