Media playback is unsupported on your device Media caption Warning signs of a potential mass shooter

The US Air Force is investigating why it didn't flag that the man who killed 26 people in a Texas church had been barred from possessing firearms after a domestic violence incident five years before the mass shooting.

Former airman Devin Patrick Kelley was court-martialled in 2012 after assaulting his wife and stepson. He was detained in a military prison for 12 months and banned from owning or buying a gun before being, later, thrown out of the military.

In a statement, the air force said that its initial information indicated that Kelley's domestic violence offence "was not entered into the National Criminal Information Center database" by investigators who had handled his case.

Indicator of a murderer?

US gun laws are really complicated and differ from state to state, but across the country people with domestic violence convictions cannot buy a gun, a rule that has been in place for 20 years.

Image copyright Getty Images

So what is the relationship between domestic violence and shootings in the US? Is domestic abuse a good indicator that someone will ultimately become a mass murderer?

Between 2009 and 2016 there were 156 mass shootings in the United States, meaning incidents in which four or more people were shot and killed. In total, the attackers killed 848 people and left a further 339 with gunshot injuries.

Every Town For Gun Safety, a campaign group, turned to the FBI's published data on these appalling crimes and analysed the histories of each attacker for a link to domestic or family violence. It found that in 54% of the shootings, the perpetrator shot a current or former intimate partner, or other family members.

Warning signs

In other words, the group argued that domestic violence was a driving factor in a majority of cases.

The analysis found that in more than 40% of mass shootings, the perpetrator had "exhibited warning signs" such as violent or threatening behaviour that indicated they were a danger to themselves or others.

Image copyright Getty Images Image caption Kelley had argued with his mother-in-law before targeting the church where she worshipped

What about how many mass shootings in the US actually escalate from an act of domestic violence?

The US Congressional Research Service, which produces expert impartial reports in a similar way to their counterparts in the British Parliament, has also looked at the relationship between domestic violence and mass shootings.

It separated "familicide" mass murders - in which a killer shoots dead his entire family but doesn't turn his attention on anyone else - from what the public would more readily understand as a mass shooting that occurs in a public place.

When it analysed those remaining incidents over the 15 years to 2013, it found that a fifth of the 66 public-place mass shootings had been "possibly triggered" by a domestic row.

"In some cases, offenders were able to purchase a firearm, or allowed to keep firearms already in their possession, and commit mass murder, even though they had previously had domestic violence restraining orders filed against them or had been convicted of misdemeanour domestic violence offences," said the paper.

Breaking the link

The Centre for American Progress, a think tank, has lobbied for new laws to cover the 12,000 additional people in the US who are convicted of lower-level stalking crimes that do not lead to confiscation of firearms.

It argues in some cases there will be a clear link between firearms, domestic violence and mass shootings - and more could be done to break it.

Of course the scale of domestic violence compared with that of mass shootings means not every abuser will become violent to strangers.

But in many cases those who are violent to strangers have also been violent at home.

Read more from Reality Check

Follow us on Twitter