Dylann Roof should not have been allowed to purchase the handgun he allegedly used to kill nine people in a Charleston church last month, according to the FBI.

FBI director James B. Comey said Friday that a mistake during the federal background check caused investigators to overlook Roof’s previous admission of drug possession, which should have prevented him from buying the 45-caliber handgun (that he reportedly purchased using cash he received from his parent for his 21st birthday). From USA Today:

During the mandatory background check prior to the attempted April 11 gun purchase, Roof’s March 1 arrest on felony drug charges was mistakenly attributed to the Lexington County, S.C., Sheriff’s Department, not Columbia police.

The Columbia police report included information that Roof admitted to drug possession, which would have triggered a denial by the FBI NICS review process. That information was never seen by the reviewer because the FBI’s database did not include Columbia police contacts in its check of Lexington County, where Roof had been held after the arrest.

“Because of an error on our part that allowed the gun to be used to slaughter those people is very painful,” Comey said.

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

Image via AP. Contact the author at taylor@gawker.com.