Jail clerk's mistake helped Dylann Roof gain access to a gun: officials
A WBTV News image shows shooting suspect Dylann Roof being escorted by police at the Shelby-Cleveland County Regional Airport for extradition back to Charleston, South Carolina on June 18, 2015 (AFP Photo/)

A mistake by a South Carolina county jail clerk who entered the wrong information on a charging document for a drug offense in February contributed to a gun being mistakenly sold to the man later accused of murdering nine people at a black church last month, authorities said on Monday.

Dylann Roof, 21, was arrested by a Columbia Police Department officer on a drug charge and jailed on Feb. 28, 2015 but a clerk wrongly listed the county sheriff's office as the arresting agency, the Lexington County sheriff's office said in a statement Monday.

Two days later a county official corrected the name of the arresting agency -- but only internally -- to list the Columbia Police Department, Lexington County Sheriff Jay Koon said in a statement Monday.

However, that correct information never entered a database used by the FBI. In mid-April when a Federal Bureau of Investigations examiner conducted a federal background check for Roof's pending purchase of a gun - the weapon now believed to have been used in the church murders - the FBI found Roof's incorrect arrest information and mistakenly contacted the Lexington County records division.

"A records employee advised the FBI that the Columbia Police Department was the arresting agency," Lexington County Sheriff Jay Koon, said in a statement on Monday.

The examiner made several calls trying to find the correct information but never tracked down the Columbia Police Department report in which Roof admitted to drug possession after being arrested at a local mall, the FBI said last week.

That would have barred Roof from buying the weapon, FBI Director James Comey told reporters at a briefing Friday.

Apparently motivated by racial hatred, Roof was arrested a day after the Charleston church shooting and has since been charged with nine counts of murder.

(Reporting by Harriet McLeod; Editing by David Adams and Diane Craft)