A sporting goods retailer violated the law by selling an AR-15-style rifle and large-capacity magazine to a man who later used them to kill more than two dozen worshippers at a Texas church, federal prosecutors said in a court filing.

Devin Patrick Kelley presented a Colorado driver's license at an Academy Sports + Outdoors store in Texas to buy the rifle and ammunition, the Department of Justice said in a motion filed Tuesday in San Antonio.

"Academy was not permitted to sell Kelley the Model 8500 Ruger AR-556 under federal law because sale of that rifle would have been illegal in Colorado," prosecutor Paul David Stern wrote in the filing. "On November 5, 2017, Kelley used the (rifle) to commit the shooting at the First Baptist Church in Sutherland Springs."

Get Breaking News Delivered to Your Inbox

The Department of Justice wants to add Academy as a responsible third party in an ongoing federal lawsuit.

A spokeswoman for the Texas-based company declined to comment Thursday on the federal action, citing the pending litigation. Academy operates 250 stores in 16 states.

Jamal Alsaffar, an attorney representing the victims' families, said they expect federal officials to scrutinize Academy's gun sales for instances of other prohibited firearm purchases.

He also noted the findings of a government report released last year showing the U.S. Air Force failed on six separate occasions to report information that could have prevented Kelley, an ex-airman, from purchasing a gun. The Department of Defense inspector general's report detailed Kelley's decade-long history of violence, interest in guns and menacing behavior toward women. Kelley, who served nearly five years in the Air Force, was court-martialed and sentenced to one year of confinement for assaulting his wife and stepson.

"The federal government can't shirk its responsibility for its systematic and decades-long failure to report violent criminals to the FBI background check system," Alsaffar said Thursday. "Because the bottom line is that if the federal government followed the law, the shooter never would've gotten his hands on those weapons. But both things can be true at the same time. The government failed these families and so did Academy."

The 26-year-old Kelley fired at least 450 rounds at congregants in the attack that also left 20 people injured. A man living nearby shot and wounded Kelley, who fled in a vehicle and later shot himself to death, authorities have said. Sutherland Springs is southeast of San Antonio.