On Monday night, we learned beyond any doubt that Sunday’s horrific shooting at a church in Sutherland Springs, Texas was completely preventable. The gunman, Devin Patrick Kelley, had been court-martialed in 2012 for assaulting his wife and infant stepson. He pleaded guilty, and served a year in the stockade before receiving a bad-conduct discharge. The Air Force admitted that it failed to upload that case to the national database used to conduct background checks of gun purchasers.

Had that case been uploaded, Kelley would not have been able to buy the AR-15 he used to kill 26 people on Sunday. But as more details have come to light in the last 24 hours, it’s become more apparent that we shouldn’t be asking how Kelley was able to get a gun. We should be asking how in the hell Kelley was even on the streets in the first place.

In 2012, Kelley was arrested for a horrific assault on his wife, Tessa, and her baby son at their home on Holloman Air Force Base in New Mexico. He repeatedly struck, kicked, and choked Tessa, then hit his stepson in the head so hard that it cracked his skull. He was tried by a general court-martial, which is the highest level of court-martial in the American military justice system.

Under the Uniform Code of Military Justice and the Manual for Courts-Martial, he faced up to eight years’ confinement and a dishonorable discharge. This was because he was charged with assaulting his stepson in a manner that was “likely to cause death or grievous bodily harm.” Under federal law, had this case been properly entered into the database, Kelley would have been banned from buying, owning, or possessing a gun. With his guilty plea, he was now convicted of a crime for which the maximum sentence was more than a year in jail. That would have held true even if he hadn’t received a dishonorable discharge.

And yet, he was only sentenced to one year of confinement and a bad-conduct discharge. Well, let me take that back. That isn’t a sentence. Indeed, it barely qualifies as a phrase. The UCMJ explicitly provides for enhanced sentences for assault upon a victim younger than 16 years old. If Kelley had been charged in a civilian jurisdiction–or at least, in a civilian jurisdiction that didn’t have its collective head up its collective rear end–it wouldn’t have mattered if his lawyer had been one helluva talker. There would be no defensible reason to sentence someone who assaulted his wife and child in this way to less than five years in prison.

But if it were possible, this case got even more hideous on Tuesday. It turns out that Kelley had been sent to a mental health hospital after being caught sneaking weapons onto the base and threatening the officers who had ordered him to face a court-martial. He escaped in June and hightailed it to the Greyhound bus station in El Paso, but was caught by police and taken into custody.

Watch more details from MSNBC here.

NBC News justice correspondent Pete Williams said that KPRC-TV in Houston got its hands on a police report that revealed Kelley wanted to take a bus out of town once he escaped from the mental health facility. He added that if Kelley had been involuntarily committed, he should have been barred from being anywhere near a firearm. Federal law does not allow people who are committed to mental health facilities from buying, owning, or possessing a gun. And yet, it doesn’t look like this incident was entered into the database either.

It’s not often that you see a complete breakdown of the most basic safeguards intended to keep our troops and the public safe. And yet, to put it in the most diplomatic terms, that’s exactly what happened here. Simply put, in the absence of something we haven’t heard or seen, there is no defensible reason why Kelley should have even been breathing free air.

In the absence of something we haven’t heard or seen, Kelley should have been sentenced to somewhere between five and eight years in prison, and then dishonorably discharged. That would have banned him from being anywhere near a gun on two counts. Not only was he convicted of a crime carrying more than a maximum of a year in jail, but a dishonorable discharge is enough by itself to ban you from having a gun. In either scenario, there’s no question about it–had real justice been done in this case, 26 people are almost certainly still alive.

Instead, he received something that barely qualifies as a phrase. As a result, the Air Force not only failed Tessa and her son, but failed everyone with whom Kelley came into contact in Colorado Springs and the San Antonio area. Calling this a travesty and a miscarriage of justice would be being extremely kind to it.

While discussing the shooting on Tuesday, Donald Trump claimed–with a straight face–that more gun control measures would have actually led to more deaths on Sunday. By itself, that statement is ludicrous and offensive even by Trumpian standards. But it’s even more so now that we know that the Air Force missed one, and possibly two, chances to take measures that would have ensured beyond all doubt that Kelley would have never gotten his hands on guns.

Those who were responsible for Kelley’s fate must give a full accounting for how this massive FUBAR was allowed to happen. And the Pentagon and Congress need to take measures, including amending the UCMJ, to ensure that this never happens again. This nation, and especially the victims and survivors in Sutherland Springs, deserve no less.

Darrell is a 30-something graduate of the University of North Carolina who considers himself a journalist of the old school. An attempt to turn him into a member of the religious right in college only succeeded in turning him into the religious right's worst nightmare--a charismatic Christian who is an unapologetic liberal. His desire to stand up for those who have been scared into silence only increased when he survived an abusive three-year marriage. You may know him on Daily Kos as Christian Dem in NC. Follow him on Twitter @DarrellLucus or connect with him on Facebook. Click here to buy Darrell a Mello Yello.