Devin Patrick Kelley shouldn’t have been able to buy the gun he used to kill 26 people and wound at least 20 others at a Texas church on Sunday.

The U.S. Air Force, of which Kelley was a member for four years before receiving a bad-conduct discharge in 2014 for assaulting his wife and infant stepson, admitted as much on Monday. The military branch acknowledged it failed to report Kelley’s domestic violence conviction to a federal database used for background checks on gun sales.

This glaring breakdown allowed Kelley to pass multiple background checks and purchase firearms ― even though, under federal law, he couldn’t legally own them.

Now, four days after the deadliest mass shooting in modern Texas history, it remains unclear exactly how Kelley fell through the cracks.

Requests for comment from the Air Force, Department of Defense, FBI and Department of Justice failed to provide much clarity about whether the military is routinely submitting domestic violence records to the background check system, as they are required to do under federal law.

As a result, it’s unclear whether Kelley’s case was an anomaly, or if there are potentially hundreds or thousands of other convicted domestic abusers whose records were not entered into the background check system by the military.

The responses HuffPost received ― or did not receive ― as well as a review of military procedural documents, lay bare a lack of cohesion in protocol across federal agencies and a bureaucracy that may be preventing the federal background check system, known as the National Instant Background Check System, or NICS, from performing effectively.

What Should Have Happened

Under federal law, certain categories of people are prohibited from receiving or possessing firearms. A full list is here.

It includes people with domestic violence convictions. In 1996, Congress passed the Domestic Violence Offender Gun Ban, known as the Lautenberg Amendment, which bars individuals convicted of misdemeanor domestic violence crimes from owning or purchasing firearms.

States and federal agencies are expected to report relevant convictions to the FBI, which operates the federal background check system. When a person tries to purchase a gun from a licensed dealer, their name is run through the National Instant Background Check System, which checks records in three databases ― the Interstate Identification Index, the National Crime Information Center, and the NICS indices ― to determine if they are disqualified from accessing firearms.

Applicants with a domestic violence conviction should be rejected. This happens all the time: From 2006 to 2015, an estimated 89,000 individuals with domestic violence records were stopped from purchasing a gun because of background checks.

But it didn’t happen with Kelley.

After he was court-martialed in 2012 for assaulting his spouse and cracking his stepson’s skull, his conviction should have been entered into the background check system by someone at the Air Force. It wasn’t.

It’s unclear what protocol the Air Force failed to follow ― or even if there is one.

HuffPost/Reuters/Getty Devin Kelley Patrick killed 26 people when he stormed First Baptist Church in Sutherland Springs, Texas, on Sunday and opened fire.

What Actually Happened

The Air Force said in a press release Monday that Kelley’s domestic violence conviction should have been entered in the National Crime Information Center, one of the databases searched by NICS.

The statement said inspectors general for the Air Force and the Department of Defense would conduct a “complete review” to understand what happened, and to ensure that records in other cases have been reported correctly.

Based on comments from Air Force representatives on Tuesday, the review is needed. Email correspondence with these representatives suggested there isn’t a clear understanding of Air Force protocol for reporting domestic violence convictions or how it may have broken down in Kelley’s case.

An Air Force spokesperson said it wasn’t clear which database the service should enter domestic violence convictions into. Another Air Force spokesperson, as well as a Defense Department spokesperson, referred HuffPost to a Department of Defense instruction from July 2010 that governs the military’s process for reporting domestic violence convictions. But the 13-page directive fails to mention “domestic violence” or the Lautenberg Amendment.

This likely is because there is no defined “domestic violence” charge under the Uniform Code of Military Justice. In domestic violence cases, abusers are charged with other crimes, such as assault.

The Department of Defense still recognizes these crimes as domestic violence. Another instruction notes that any crime involving the use or attempted use of physical force, or threatened use of a deadly weapon, is to be considered domestic violence for the purposes of the Lautenberg Amendment if it is committed by a “current or former spouse, parent, or guardian of the victim, by a person with whom the victim shares a child in common, by a person who is cohabitating with or has cohabitated with the victim as a spouse, parent, or guardian, or by a person similarly situated to a spouse, parent or guardian of the victims.”

Rachel E. VanLandingham, a national security law expert and former Air Force judge advocate, described the omission of “domestic violence” in the 2010 directive as “a really big problem.”

It’s “really shocking,” VanLandingham told HuffPost in an email. “An example of a huge bureaucracy where everyone is assuming someone else is doing what needs to be done.”

Sen. Jeff Flake (R-Ariz.), along with Sen. Martin Heinrich (D-N.M.) is spearheading legislation that would require the military to promptly report members of the armed forces convicted of domestic violence offenses to the background check system.

While that already appears to be the law, Flake pointed to an online FBI report that shows that the Department of Defense has only entered one domestic violence record into the background checks system since 2007. It is unclear if the chart he was referring to accurately represents all reports by the military to the federal background check system.

The possibility that Air Force reporting failures extend beyond Kelley isn’t far-fetched.

According to a 2014 Defense Department inspector general’s report, from August 2012 to January 2013, the Air Force failed to submit any information about criminal convictions into the background check system.

The report blamed the failure on Defense Incident-Based Reporting System program administrators leaving their jobs “before replacements were trained on their responsibilities.” It added: “The reporting lapse was immediately corrected based on our observation.”

It’s unclear whether Kelley’s conviction was part of this “lapse,” or if the correction meant records of convictions that had been left out of the database were retroactively submitted.

In the end, the only thing crystal clear is a lack of transparency in how the Air Force is following the law to report domestic violence convictions to the database. While the Air Force conducts its review, Americans are left to wonder how many other offenders like Kelley are buying guns.