Dylann Roof was under federal indictment, so how did he buy a gun?

FBI Director James Comey said Friday that Dylann Roof should have been denied a gun due to a pending federal drug charge.

Charleston, S.C., shooting suspect Dylann Storm Roof, center, is escorted from the Sheby Police Department in Shelby, N.C., June 18 FBI director James Comey says Mr. Roof, the gunman in the Charleston church massacre should not have been allowed to purchase the gun used in the attack, and on July 10 attributed the problem to incomplete and inaccurate paperwork related to an arrest of Roof weeks before the shooting.

Chuck Burton/AP/File

July 10, 2015

Dylann Roof, the accused perpetrator of the mass shooting at a church in Charleston, S.C., last month, should have been prohibited from buying the gun he used in the attack, FBI Director James Comey said Friday.

Mr. Roof had been arrested in late February at a Columbia shopping mall for possession of the controlled substance Suboxone, a drug commonly used to help addicts transition off of heroin.

Federal laws that prohibit the sale of a firearm to anyone "under indictment for" a felony should have stopped Roof from purchasing the gun on April 11. But incorrectly entered information on Roof’s records meant that the FBI background check examiner who was responsible for evaluating the purchase was not able to see the arrest report, Mr. Comey said.

In Kentucky, the oldest Black independent library is still making history

"If she had seen that police report," Comey said, "that purchase would have been denied."

Under federal law, the FBI has three days to either approve or deny the purchase. If there is no answer from the federal agency in the time period – like in Roof’s case – the purchaser can return to the store and buy the gun.

Many major national gun dealers, like Wal-Mart, will not sell the weapon without an answer from the FBI but many smaller outlets will, The New York Times reported.

Law enforcement officials had previously said the transaction was entirely legal, despite the drug arrest, NBCNews reported.

Comey said he learned about the mistake on Thursday night and FBI officials plan to meet with the families of the nine people killed in the shooting at Emanuel African Methodist Episcopal Church.

A majority of Americans no longer trust the Supreme Court. Can it rebuild?

“We are all sick this happened,” he said. “We wish we could turn back time.”

Comey has also ordered an internal 30-day review into how the FBI uses criminal background checks in gun transactions.

The FBI director's announcement came within hours of the Confederate flag's removal from the South Carolina State House, which was due in large part to the attack in Charleston.

This report contains material from The Associated Press.