Image copyright Getty Images Image caption Twenty-six people died in the mass killing in Texas

US Attorney General Jeff Sessions has ordered a thorough review of the FBI database used to check the backgrounds of people who want to buy guns.

The review will assess how key information about the gunman who carried out a mass shooting at a church in Texas on 6 November was apparently not registered.

Mr Sessions said it was "unacceptable" that this may have been the case.

Twenty-six people were killed and 20 wounded in the Texas shooting.

That incident came just a month after a gunman in Las Vegas opened fire on an outdoor music festival, killing 58 people and wounding hundreds in the deadliest mass shooting in recent US history.

Mr Sessions called for clarity from federal agencies in cases where people had lied on their gun-purchase applications.

Image copyright Getty Images Image caption Mr Sessions says that he wants to ensure that people who are prohibited from purchasing firearms are prevented from doing so

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

"The recent shooting in Sutherland Springs, Texas revealed that relevant information may not be getting reported to the National Instant Criminal Background Check System (Nics) - this is alarming and it is unacceptable," he said in a statement on Wednesday.

Are US mass shootings getting more deadly?

Trump rejects stricter gun checks

Five reasons US gun control won't happen

America's gun culture in 10 charts

Mr Sessions said he was directing the FBI and the Bureau of Alcohol, Tobacco, Firearms and Explosives "to do a comprehensive review of the Nics" and report back to him the measures that could be taken to ensure that "people who are prohibited from purchasing firearms are prevented from doing so".

Media playback is unsupported on your device Media caption After the Las Vegas attack in October 2017 the BBC looked at how US mass shootings are getting worse

He said that Texas gunman Devin Kelley's 2012 conviction for domestic assault showed that not all the necessary information was being added to the Nics.

US gun violence

Kelley, a former Air Force serviceman, was convicted for assaulting his first wife and a stepson. US federal law does not allow anyone to sell a gun to someone who has been convicted of a crime involving domestic violence against a spouse or child.

The gunman killed himself while trying to get away after the shooting. He is believed to have bought guns from a store in Texas in 2016 and 2017, but it is not clear whether they were used in the attack.

The Pentagon has already launched its own inquiry into Kelley. The House of Representatives Armed Services Committee has said that it will be investigating the Air Force's alleged failure to notify the FBI of Kelley's criminal record.