The U.S. Air Force missed at least two chances to block the shooter in last weekend's deadly church attack in Texas from buying guns after he was accused of a violent offense in 2012, according to current and former government officials and a review of military documents.

A third opportunity to flag shooter Devin Kelley was lost two years later by a twist of bad luck when a Pentagon inspection of cases narrowly missed the former airman.

The air force said Monday it had failed to provide information as required about Kelley's criminal history to the FBI's criminal databases. It gave few other details about the omission.