Story highlights The lawsuit follows the Sutherland Springs mass shooting

The gunman in the church shooting was permanently barred from buying guns in 2012, but bought one in 2016

(CNN) The cities of New York, Philadelphia and San Francisco are suing the Department of Defense for failing to consistently report convictions to a federal database that is checked before firearms purchases.

The lawsuit follows a mass shooting at the First Baptist Church in Sutherland Springs, Texas, by a lone gunman identified as 26-year-old Devin Patrick Kelley. Kelley's 2012 court martial conviction for domestic assault while he was in the Air Force was not reported to the National Instant Criminal Background Check System (NICS).

As the suit notes, Kelley's conviction made it illegal for him to purchase or possess a firearm. But in 2016, he was able to purchase a Ruger AR-556 rifle he allegedly used in the shooting, which killed 26 people and injured 20 others, from a store in San Antonio, Texas.

The Department of Defense has already told Congress it is investigating the database issue across services.

But the three cities in the suit are asking a federal judge based in Alexandria, Virginia, as an "independent" authority, to compel compliance with the reporting requirement and to establish a timetable for compliance.

Read More