Under heavy pressure from federal courts to relieve prison overcrowding, but unwilling – for political reasons – to directly release inmates, Gov. Jerry Brown and the Legislature devised realignment.

Newly convicted felons whose crimes were presumed to be nonviolent, nonsexual and nonserious would be diverted into local jails, and local probation and rehabilitation services, thereby reducing the prison population by attrition.

Felons already in prison would be paroled more leniently, and parole violators who once would have been shipped back to prison would receive more tolerant treatment.

From Brown’s standpoint, it’s worked brilliantly.

The prison population, which had topped 170,000 before federal judges intervened, has dropped under 120,000 and is just a few thousand away from complying with the judges’ number.

However, as with all big political decisions, there are unforeseen – or at least unacknowledged – consequences. The biggest impact has been on local criminal justice, particularly jails.

As Los Angeles Times reporter Paige St. John details in a recent article, the sheriffs who operate local jails have made room for tens of thousands of diverted felons by releasing misdemeanor offenders, while parole violators are often released immediately.

Effectively, therefore, jailers have become judges, deciding who remains locked up and who is released, regardless of their original sentences.

Logic would indicate that having fewer miscreants behind bars would result in more crime, and local officials believe that it has. But there’s an obvious reluctance by Brown or legislators to acknowledge the side effects of what they wrought.

We are left, therefore, with anecdotes, the most sensational of which, as St. John’s article notes, involves Sidney DeAvila, a sex offender whose parole was revoked numerous times, mostly for disabling his GPS tracking device, but who was quickly freed each time.

Almost immediately after being released in 2013, DeAvila raped and killed his 76-year-old grandmother in Stockton, then chopped her body into pieces. He’s now in prison on a 25-to-life sentence for the horrific slaying.

The state has authorized periodic bond issues to underwrite local jail construction, but the need has outweighed the money.

Moreover, there’s an ongoing squabble over whether jails should be expanded, as sheriffs and county supervisors want, or more should be spent on rehabilitation and substance abuse to reduce recidivism, as liberal politicians prefer.

However it’s done, Capitol politicians must acknowledge realignment’s real-world impact and address chaos in local jails that forces jailers to decide who goes and who stays.

Sidney DeAvila is the poster boy for a malfunctioning local penal system created by political expediency.