A new lawsuit filed on Friday partly blames the Pentagon for the tragic shooting at a Texas church in November that left 26 dead and 20 injured. Three cities are suing the Defense Department over gun-check system failures that have come to the public's attention after such horrific events. Though the military has to report to the F.B.I. when its service members commit felonies and domestic assault, that doesn't always happen. In turn, these crimes are never logged into the federal database that prevents offenders from buying guns.

The Texas church gunman, for example, had been convicted in 2012 of assaulting his wife and stepson. He had been a member of the Air Force at the time and received a bad-conduct discharge. This crime should have disqualified him from purchasing a firearm, but the military did not report it, so it was never added to the F.B.I.'s National Instant Criminal Background Check System. In 2016, Kelly bought a Ruger AR-556 assault rifle in San Antonio, Texas. The lawsuit (filed by San Francisco, Philadelphia, and New York) alleges that this is the weapon he used to murder dozens of people the following year.

The court documents list the defendants as the Defense Department; the departments and secretaries of the Air Force, Navy, and Army; Secretary of Defense James Mattis; and several other high-ranking defense officials. It claims that they "have not met, and are still not meeting, their long-standing legal obligations."

Recent military investigations found that the military often fails to report this criminal data — sometimes as much as a third of the time. The Defense Department is further investigating the problem. A spokesperson for the Justice Department told Politico that Attorney General Jeff Sessions intends to "work with the Department of Defense to identify and resolve any issues with the military’s reporting of convictions."

But the plaintiffs evidently do not trust that the military's investigation will be enough to reverse a decades-long trend of underreporting this data. The suit asks that the judge force compliance with the standing requirement and set a timetable by which the military must fix the problem.

"Plaintiffs ... seek immediate injunctive relief to compel Defendants to repair this broken system, and to cure once and for all the potentially deadly gaps in the NCIC database for members or former members of the Military Services," the court papers say.

The documents also claim that the cities have a right to sue because their own "governmental responsibilities" rely on "the integrity and completeness" of the federal database.

"The background check system only works if it contains the proper records," Philadelphia mayor Jim Kenney said in a statement. "We’re joining in this suit because reporting these records is absolutely critical to those decisions."

"The national criminal background check system is the backbone of common-sense gun regulations," Dennis Herrera, San Francisco's Attorney General, said in a Tuesday statement. "The Defense Department's failure to fulfill its legal duty and accurately report criminal convictions puts innocent Americans at risk. It is past time to ensure that we're doing everything we can to keep guns out of the wrong hands."

The November shooting occurred on Nov. 5 at Sutherland Springs' First Baptist Church. It was the deadliest in state history. The parents of one victim, Bryan Holcombe, have also sued the Air Force for its failure to report Kelly's domestic assault conviction, saying that the military branch "utterly failed in ... [its] obligations." Joe Holcombe, Bryan's father, wrote in the suit that he "suffered grievous mental anguish from the death of his son and the loss of his society, companionship and affection." In addition to Bryan, the Holcombe family lost seven members in the massacre.

Though the gaps in the background-check and reporting system have existed for years now, this lawsuit ensures the public will be holding the Pentagon accountable until it's fixed. When it comes down to it, America can't bear to witness another horror like the Nov. 5 church shooting. And it shouldn't have to.