Over the course of nearly a year, Devin Kelley, the alleged Sutherland Springs church shooter, repeatedly hit, kicked and choked his wife. He allegedly threatened her multiple times with loaded and unloaded firearms. And he pleaded guilty to hitting their stepson, a young child, so hard that the blows put his life in danger, according to legal documents.

In 2012, Kelley, an airman at the Holloman air force base in New Mexico, was convicted by a court martial on two charges of domestic assault and sentenced to a year of confinement. The domestic violence convictions were serious enough that, according to an air force spokesperson, he should have been prohibited from buying or owning firearms.

But the Holloman Air Force base office of special investigations did not enter the record of Kelley’s conviction for brutal domestic abuse into the national background check system that gun sellers use to check whether potential purchasers are allowed to buy a gun, at least according to “initial information”, an air force spokesperson, Ann Stefanek, said in a statement on Monday evening.

Kelley left the air force in 2014 with a bad conduct discharge, but Geoffrey Corn, a military law expert at South Texas College of Law, said this alone would not have been enough to bar him from gun ownership.

Law enforcement officials said Kelley went on to buy at least four guns, two in Colorado and two in Texas, in 2014, 2015, 2016 and 2017. On Sunday, officials said, Kelley opened fire on a tiny church during morning services, killing 26 people, many of them children, and wounding 20 more as they sat in the pews in a rural Texas town. Officials said there were early indications that the shooting was motivated by a domestic dispute. The youngest murder victim was roughly 18 months old, officials said, the oldest 77.

Officials said they recovered a Ruger AR-15-style rifle at the church, and two handguns from the shooter’s car.

Stefanek said the air force office of the inspector general and the defence department’s inspector general would conduct a complete review of the Kelley case, as well as a comprehensive review of air force records to determine whether other cases had been reported correctly.

A fire truck in front of the First Baptist Church. Photograph: Larry W. Smith/EPA

The air force also requested a broader review of criminal record reporting across the defence department. The department regularly reports dishonourable discharges to the national background check system. A 2016 report from the FBI listed 10,956 active dishonourable discharge records that the defence department had submitted to the national instant criminal background check system (Nics).

After high-profile mass shootings in the past decade, the Nics background check database has repeatedly come under scrutiny for faulty reporting, missing records and bad procedures, including after the 2007 Virginia Tech shooting and the 2015 white supremacist attack on a historic black church in Charleston, South Carolina. Advocates have led campaigns to correct failures to report the appropriate state mental health records to the background check system.

“We don’t have a good system now,” Jeff Flake, a Republican senator who has voted against gun control measures in the past, said in a CNN interview on Monday, already raising concerns about the Nics system. “We need better information sharing, if nothing else.”

Asked during a press conference in Seoul if he would consider “extreme vetting” for gun purchases, as he has for immigration, Donald Trump said it would not have prevented the mass shooting in Texas.

“If we did what you’re suggesting there would have been no difference three days ago,” he said. “Not going to help.”

He praised the actions of a man who lived near the church and used his own gun to fire at the suspected shooter as he fled.

“You look at the city with the strongest gun laws, Chicago, and Chicago is a disaster, a total disaster,” Trump said, a claim that has been consistently proven incorrect.

During his court martial, Kelley originally faced seven counts of assault, including allegations that he had threatened his wife repeatedly by pointing loaded and unloaded firearms at her, according to legal documents provided by the air force.

But air force prosecutors made a deal with Kelley and allowed him to avoid five of the charges, including all of the charges involving firearms, in exchange for him pleading guilty to the first two charges of physically striking his wife and stepson, Stefanek told the Guardian.

“They withdrew those charges on the others so they could get the conviction without having to drag the family through court,” she said.

Additional reporting by Benjamin Haas in Seoul