WASHINGTON — Law enforcement authorities in South Carolina said on Monday that a jail clerk there had made an error when entering information into a computer system about a February drug arrest of the man who is charged in the killing of nine people in a historically black church in Charleston last month.

The mistake, which was first reported by The Associated Press, was likely to have contributed to confusion the F.B.I. had about where the arrest occurred when it sought to obtain a police report about the drug incident.

The F.B.I. sought the report in April while it conducted a background check to determine whether the man, Dylann Roof, should be sold a gun, which was later used in the attack.

Although the F.B.I. never obtained the report and did not approve the sale, Mr. Roof was able to purchase the firearm through a loophole in federal gun laws several days after he initially applied to buy it.