CHARLESTON, S.C. – Relatives of the victims and survivors of the Emanuel AME Church shooting in Charleston are suing the federal government for failing to prevent the sale of a gun used in the slayings of nine parishioners.

Five survivors and five families of those killed are faulting the government, claiming that the FBI should have denied the sale of a gun to alleged shooter Dylann Roof because of his criminal history. Complaints for wrongful death and negligence were filed Thursday.

Had the sale been denied, "it would have prevented the foreseeable harm to those people affected by Dylann Roof's use of the obtained handgun," according to the complaint.

Roof, who is from the Columbia area, was arrested in February 2015 for possessing narcotics without a prescription. Under federal law, Roof should have been barred from buying the gun because it's illegal to sell firearms to an "unlawful user of or addicted to any controlled substance."

In April 2015, Roof walked into Shooter's Choice in West Columbia to buy the handgun. When the store submitted the background check to the FBI, the purchase was initially flagged. But through a series of mishaps, the clerk did not deny the sale of the gun before the required three-day waiting period ended.

So, a few days later, Roof walked out with the Glock .45-caliber handgun he allegedly used in the killings on June 17, 2015. FBI Director James Comey would later admit that Roof never should have been able to buy the gun.

Comey's admission spurred little to no action on behalf of federal and state governments to close screening gaps in hopes of avoiding another tragedy, said Andy Savage, who is representing several of the victims and families.

"Our clients are disappointed that despite the efforts led by state Senators Marlon Kimpson and Gerald Malloy, the State of South Carolina has failed to close the 'Charleston loophole' caused by federal inadequacies, even in the shadow of this tragedy," said Savage in a written statement.

"The victims and families hope that by bringing these actions, they can shine a very bright light on these shortcomings and prevent other individuals, families and communities from dealing with unfathomable and preventable loss and injury," he said.

The goal of proposed state and federal legislation is to do away with the provision that makes a gun's sale automatic within three days, allowing the FBI to finish investigating a person's background before a sale can go through.

Richland County Sheriff Leon Lott lamented that a lawsuit had to be filed to spark action. Lott said he's not holding his breath. "But it shows you can't give up," he said. "What we're asking them to do is just common-sense stuff to save people's lives."

Lott said the federal government should allow all the time needed to ensure that someone who shouldn't have a gun doesn't get one. But a waiting period of up to 30 days should be the compromise, he said.