(Reuters) - A federal appeals court on Wednesday rejected an effort by three major U.S. cities to require the Pentagon to be more vigilant about reporting service members who were disqualified from owning weapons to a national background check system.

FILE PHOTO: A Comal County Sheriff's office vehicle is stopped in front of the residence of Texas church shooting suspect Devin Kelley in New Braunfels, Texas, U.S., November 6, 2017. REUTERS/Jon Herskovitz/File Photo

By a 3-0 vote, the 4th U.S. Circuit Court of Appeals said it lacked jurisdiction to compel the Department of Defense to fix what New York City, Philadelphia and San Francisco called a “broken” system, or to supervise improvements to the Pentagon’s “partial and inconsistent reporting.”

The cities sued seven weeks after former Air Force member Devin Kelley killed 26 people on Nov. 5, 2017 at a Sutherland Springs, Texas, church before killing himself.

Kelley, 26, was convicted in a 2012 court martial of assaulting his wife and stepson and should not have been allowed to possess weapons. But his conviction had not been entered into the National Instant Criminal Background Check System.

The cities said the Pentagon had failed to report some 15,000 current or former personnel who could not own guns because of court martial convictions or dishonorable discharges, and that this undermined their ability to fight violent crime.

Writing for the Richmond, Virginia-based appeals court, Circuit Judge J. Harvie Wilkinson praised efforts by cities and towns nationwide to protect the public from violence that is too often committed by people who should not have firearms.

“The APA, however, does not permit their efforts to include judicial supervision of the myriad programmatic workings of the federal government,” Wilkinson wrote, referring to the federal Administrative Procedure Act.

He said courts couldn’t step in despite what the cities viewed as the Pentagon’s widespread and systemic failure to provide disqualifying conviction records for former personnel.

“The department has admitted as much and is engaged in extensive efforts to increase its compliance,” Wilkinson wrote.

A spokesman for New York’s law department said it was disappointed with the decision, but also pleased with the court’s admonishment for the Pentagon’s lapses.

San Francisco City Attorney Dennis Herrera said his office will evaluate its legal options.

Philadelphia’s law department declined to comment. The U.S. Department of Justice, which represented the Pentagon, also did not respond to requests for comment.

Wednesday’s decision upheld an April 2018 ruling by U.S. District Judge Claude Hilton in Alexandria, Virginia.