Gov. Jerry Brown now says he had regrets almost immediately after he signed a bill nearly four decades ago mandating “determinate” state prison sentences for California’s convicted felons.

It was an era in which politicians in both parties were tripping over themselves to prove they were tough on crime and the young governor was not about to be left out. For the most part, the law eliminated “indeterminate” sentences, where felons might serve only partial sentences if they behave themselves and earn credits. Determinate sentences mandate serving a specific length of incarceration.

As the years passed, and with the enthusiastic support of voters, the list of crimes warranting longer and longer determinate state prison sentences expanded. And numerous enhancements were created, such as for committing a crime with a gun, that add years to determinate sentences. Today, a string of enhancements actually may be longer than the primary crime’s sentence.

Now a much older Brown, who is finishing his fourth term as governor, laments the unintended consequences of the determinate sentencing law he signed.

When the tough-on-crime law was implemented in 1978, there were 21,325 people behind bars in California prisons. Today, the number has grown to 128,000 and taxpayers are spending about $10 billion a year to incarcerate felons.

And despite operating 34 correctional facilities and having contracts with two out-of-state facilities and two in-state private prisons to house prisoners, California struggles to comply with a U.S. Supreme Court order to end overcrowding.

The state took a stab at reducing the overcrowding in 2011 by shifting lower-level felons to county jails. But that worsened conditions in already crowded local facilities and only temporarily reduced the flow into state prisons.

In 2012, voters supported a ballot measure that limited the state’s tough three-strikes sentencing law by requiring the third strike to be for a violent crime. The goal was to reduce the number of people serving life sentences. Then in 2014, voters supported a measure that reduced some felonies – notably drug felonies -- to misdemeanors. The measure resulted in about 4,000 inmates being released.

But that’s still not enough to end overcrowding. Californians now have two choices: continue to pay more taxes to build more prisons to keep more people behind bars; or reform the sentencing and incarceration system to more reasonably punish and rehabilitate criminals.

To do nothing and allow California’s prison overcrowding to grow is a dangerous alternative. At some point, probably in the very near future, the federal courts will mandate the release of prisoners. Some of the prisoners released may be more dangerous than the ones now being targeted by Prop. 57.

Proposition 57, on the November ballot, is the governor’s proposal to reform the state’s sentencing system to allow people convicted of nonviolent felonies to be considered for parole after completing their sentence for their primary crime, without enhancements. Nonviolent felonies are listed in the Penal Code.

To encourage inmates’ good behavior, the state Parole Board can consider credits for such things as conduct, rehabilitation and educational achievements. The governor also must agree before parole is granted to an inmate.

Juvenile offenders over the age of 14 will receive a juvenile court hearing before being tried in adult court. There will no longer be automatic referrals to adult court, or prosecutors deciding where a case will be tried. Requiring a judge to decide is expected to reduce the number of juvenile felons eventually sent to state prison.

About 30,000 currently incarcerated prisoners eventually could be considered for parole if Prop. 57 passes. That does not mean these prisoners will automatically be considered; nor does it mean parole will be granted.

It is hard to predict how many prisoners will be released now and in the future, and how much money taxpayers will save if Prop. 57 passes. But the legislative analyst estimates the annual cost savings will be many millions.

Prosecutors, law enforcement and correctional officers adamantly opposed Prop. 57. They contend it will result in dangerous criminals being released.

For that not to happen, the state must enhance its prisoner rehabilitation programs that will treat inmate drug abuse and prepare inmates for honest employment when they are released.

One way or another, these prisoners eventually will be coming home. Either the courts will order their release, or we can create a better system to punish and rehabilitate felons.