Four branches of the United States Military failed to submit to the FBI nearly a quarter of the records needed to prevent someone prohibited from buying a firearm.

According to a report from the Department of Defense’s Office of Inspector General released Tuesday, the Army, Navy, Air Force, and Marine Corps all failed to submit reports of its members convicted of an offense to the FBI’s Criminal Justice Information Services. That information is then added to the FBI’s Next General Identification database that stores, compares, and exchanges fingerprint data and criminal history for law enforcement use. The National Instant Check System uses that information when someone attempts to buy a firearm from a licensed purchaser.

The report comes on the heels last month's deadly shooting in Sutherland Springs, Texas, that left 26 churchgoers dead and another 20 injured. The gunman, 26-year-old Devin Patrick Kelley, was prohibited from purchasing or possessing firearms due to a domestic violence conviction in a court-martial while serving in the Air Force.

However, the Air Force failed to report the conviction to the FBI, which prevented the National Instant Check System from flagging Kelley as someone should be blocked from buying a firearm.

From Jan. 1, 2015 to Dec. 31, 2016, nearly a quarter — 601 — of the roughly 2,500 total fingerprint cards of a convicted offender required to be submitted to the FBI were not, the inspector general report reveals.

According to the FBI, every time the fingerprint of a criminal has been submitted to the FBI, a final disposition report — i.e. the formal or informal conclusion of an arrest or charge — must also be submitted.

The inspector general found of the 2,500 final disposition reports, a whopping 31 percent — 780 — were not submitted to the FBI.

The Army, Navy, and Marine Corps had more missing fingerprint cards and final disposition reports, according to the report.

The Army had 262 (28 percent) missing fingerprint cards and 385 (41 percent) missing final disposition reports; the Navy had 197 (29 percent) missing fingerprint cards and 243 (36 percent) missing final disposition reports; and the Marine Corps had 37 (29 percent) missing fingerprint cards and 46 (36 percent) missing final disposition reports.

The inspector general recommended the secretaries of all three branches submit the missing fingerprint cards and final disposition reports immediately to the FBI, and then undergo a comprehensive review of all databases and files dating back to 1998.