LOS ANGELES — In 1951 Walter Wanger, the film producer, shot Jennings Lang in the groin, thereby setting in motion a chain of events that would result in one of the best prison movies ever made. It’s a taut little thriller called Riot in Cell Block 11 that I count as one of Don Siegel’s greatest works, and that’s no small praise when we’re talking about the man who also directed Dirty Harry, Invasion of the Body Snatchers, and The Killers.

The way it happened is that Walter Wanger, a World War I fighter pilot who had worked in production at just about every major studio and was responsible for such classics as The Sheik and Queen Christinasuspected his wife, the actress Joan Bennett, was cheating on him. So he hired a private eye to follow her — and the gumshoe ended up tracking her and her MCA agent, Jennings Lang, to bedrooms in New Orleans, the Caribbean, and Beverly Hills. Wanger was predictably enraged, so he waited until the two of them returned from a mid-day tryst, caught them making out in Lang’s Cadillac, and fired two shots. The first one glanced off the tail fin of the car while Joan Bennett was yelling, “For God’s sake, Walter, he’s only an agent!” The second shot, fortunately for film history, did not destroy its target — Jennings Lang’s penis — but did embed itself in the soft tissue of his inner thigh so that Lang ended up screaming in agony.

The combination of a slut-shaming jury and an extremely expensive lawyer saved Wanger’s career — but not his wife’s — when he was sentenced to just four months in jail. Those four months were apparently so unpleasant that Wanger emerged as a fierce advocate of prison reform. A few months later inmates at the Michigan State Prison in Jackson overpowered a guard, took over a cell block, and held nine guards hostage for five days while agitating for better conditions in lockup. The warden and governor agreed to all their demands, which were published in the newspaper, and so the rioters gave up the hostages without harm. (The Michigan legislature later double-crossed them by reneging on all the promises.) Wanger was so intrigued by this drama as it played out in national headlines that he asked prolific B-movie screenwriter Richard Collins to write a docudrama on the uprising.

And what a script he came up with. At just 80 minutes long, Riot in Cell Block 11 is a masterpiece of exploitation storytelling, partly because they used virtually every tough-guy character actor in Hollywood. Neville Brand in his prime plays the ringleader of the rioters, while a muscled-up Leo Gordon plays the psycho killer who should be at a mental facility instead of in general population. Gordon had served five years at San Quentin as an armed robber before he turned to the more vicious field of acting, so he didn’t have to stretch that far to find his character. Emile Meyer, known mostly for being a nasty killer in westerns, goes against type as the tough-but-sympathetic warden who blames the state government for the riot because of their constant refusal to fund basic daily necessities, turning his prison into a powder keg of stress.

But the real star of the film is Folsom Prison.

Don Siegel, who would become the mentor of both Clint Eastwood and Sam Peckinpah, was given the kind of access to Folsom that allowed him to place cameras on catwalks, gun towers, belfries, and stone corridors in such a way that the prison becomes the Labyrinth of Daedalus, with a modern minotaur — Leo Gordon as Crazy Carnie — at its center. The glorious black-and-white photography of Russell Harlan brings out the cold, austere monotony of the place, swallowing up the men inside by bleaching all the light out of their environment. The doors, gates and cages through which they pass seem to constantly remind them of their hopelessness and vulnerability.

But what struck me more powerfully than anything else in the film when I rewatched it last week is this:

The prisoners’ complaints, in 1952, are the same complaints I heard from prisoners in the various Texas facilities I covered as a reporter in the seventies, and they’re the same complaints uncovered by Ted Conover when he went undercover as a guard at Sing Sing in the late nineties for his book Newjack, and they’re the same complaints you hear whenever some special commission studies a riot or a murder in the California penal system today. In fact, the violent gangs in ultra-modern California facilities like Pelican Bay and Corcoran make the horrors of Alcatraz seem quaint.

We know what causes prison riots, and we’ve known for a long time, and those causes are expertly summed up by four of the demands in Neville Brand’s speech to the assembled press:

More room to breathe.

It seems to be a law of political physics that, if you build a prison of any size, you will fill it up, and when you do fill it up, you’ll refuse to build another one to handle the overflow. Prison architecture is a reverse Field of Dreams. Instead of “if you build it, they will come,” it’s “if you build it, you will feel compelled to stuff people into it.” As soon as you start forcing people into double cells and noisy cramped wards, you have a sleep-deprived stressed-out inmate population that starts viewing the guards as enemies and torturers. Field of Horrors.

Separate the nuts.

The Leo Gordon character in Riot in Cell Block 11 is a deranged psycho. When Conover published Newjack in the year 2000, he estimated that 30 percent of the inmates in Sing Sing were mentally ill and not receiving treatment. When you put mentally ill people in with the normals, it’s dangerous to both groups. The last thing you want in a prison is unpredictable behavior, and that’s what you get when the system says convicts are “pure evil” instead of mentally deranged. I used to see this all the time in the Texas Department of Corrections. I interviewed a 400-pound serial killer named Lawrence Gross whose M.O. was luring elderly couples to motel rooms and then cutting them into small pieces. By some strange chain of events he had been adjudged sane by the courts and put in general population in Huntsville. He was obviously crazy as a loon — you could tell it within 30 seconds of meeting him. I had to sign a release form to be allowed to sit six feet from him in the interview room, and yet several hundred inmates had to pass closer to him than that on any given day.

Juries are to blame for many of these mental cases being in the wrong prison. I witnessed a mass murderer named Abdelkrim Belachheb who had actual brain damage — there were medical scans introduced at trial to prove it — be pronounced sane by a Dallas jury. He would spend the remaining 35 years of his life rotting and raving from his isolation cell in the Clements Unit in Amarillo, a disciplinary nightmare, a constant danger to corrections personnel, and a man with so little understanding of prison rules that he ended up getting 29 additional years tacked onto his life sentence just for crimes committed in the joint.

The safest way to deal with criminal insanity — and I’m surprised I have to point this out — is to find them not guilty by reason of insanity. This is what happened to Ed Gein, the killer who inspired Psycho, The Texas Chain Saw Massacre and Silence of the Lambs, among many other films. He was declared incompetent in a fairly simple straightforward hearing in 1957 and spent the rest of his life at the Central State Hospital for the Criminally Insane in Waupun, Wisconsin. There was an actual trial on the merits in 1968. Gein was found guilty on the facts but not guilty due to insanity — and returned to the hospital where he was no danger to anyone, since criminal hospitals are set up to deal with unpredictable behavior.

At some point in the late sixties or early seventies, judges and juries seem to have cranked down the meaning of the word “sanity” to such a low level that they started sentencing lunatics and schizophrenics and 97 other varieties of psychos to prison terms instead of hospital terms. This is dangerous in two ways. First of all, a clever psychopath can figure out a way to get parole, whereas the violent criminals in state hospitals never get out. They can be held in perpetuity, and almost always are. The second danger is to prison guards and other inmates. There’s nothing more dangerous than a schizophrenic in a cage, even if he only gets out of that cage one hour a day.

Get rid of the leg locks, chains and brutal guards.

Neville Brand’s third demand would have to be updated today. The leg locks and chains are not entirely gone, but they’re rarely used. They’ve been replaced by a more sinister management tool — solitary confinement, often for 23 hours a day — and every professional who has ever studied solitary confinement has agreed that it leads to the worst kind of desperation and anti-social bitterness. Mental health professionals will all tell you that inmates need some form of social interaction, even if it’s just idle talk in the mess hall or conversation with a guard, because the alternative — endless brooding — results in derangement, anger, and often suicide. Solitary confinement should be a last resort, or a temporary punishment, not a warehousing technique. They replaced the leg locks and chains with something worse.

Teach us a trade.

Very few prisons offered any sort of real education at the time Riot on Cell Block 11 was released. That started to change in the late fifties, sixties, and into the seventies as it became commonplace for institutions to offer GED programs and vocational training. Then, inexplicably, legislatures and prison boards started slashing these programs in the late eighties and nineties. There are some prisons today where you’re not even allowed to have a book, much less access to a computer.

The United States imprisons more people than any country in history — 737 inmates for every 100,000 citizens. The only country even remotely close to that is Russia, at 615, but Russia has much shorter sentences. China, which we’re fond of chiding for its human-rights abuses, doesn’t even make the top ten. You would think that, if we’re this in love with prisons, we would be the one country who knows how to run them:

Breathing room. Separate the nuts. No brutality. Education.

We can’t do any of that, and yet we continue to sentence people to throw-away-the-key terms — and not just for murder. We have the most medieval sentencing standards in the world — three, four, and five times longer than other countries where someone is convicted of the same crime.

What that says about us is that we want criminals caged until they’re starved out, regardless of whether they’re crazy or sane. We want them boxed up and kept out of sight. Put down like rabid dogs. If the occasional riot is the result of that, so be it. Walter Wanger and Don Siegel both thought Riot on Cell Block 11 would be a wakeup call for the nation. It was. We realized we needed a lot more prisons with a lot thicker walls.

Since 1982, Joe Bob Briggs has been the drive-in movie critic of Grapevine, Texas.