One Wednesday night last June, Dylann Roof walked into a South Carolina church during its weekly bible study. About an hour later, he walked out, leaving nine dead or dying congregants behind.

That act, described by federal authorities as a hate crime, shocked the nation, prompting soul-searching and a national outcry against the Confederate symbols he embraced. It also got Rep. David Cicilline (D-R.I.) and the left-leaning Center for American Progress thinking about the role firearms play in hate crimes.

The role, CAP found, is substantial.

Firearms were used or threatened to be used in 43,000 hate crimes from 2010 through 2014, according to a CAP report released on Wednesday, the same day that Cicilline unveils a bill to bar individuals convicted of hate crimes from owning guns.

“This is a particularly serious concern when you look at violent extremists,” Cicilline told The Washington Post ahead of the release of the bill. The Post also reviewed the CAP report ahead of its public unveiling.

Large as the number of gun-related hate crimes may be, it represents just a small fraction of the overall total, which CAP estimates at more than 1.2 million over that five-year period.

But determining such numbers in the first place wasn’t easy.

“One of the things that became clear really quickly was the fact that data on hate crimes in this country is really poor,” said Chelsea Parsons, one of the report’s three authors and a vice president of guns and crime policy at CAP.

The FBI is required to collect statistics on hate crimes, but participation is voluntary for the state and local law enforcement agencies that provide the data. That, coupled with the fact that victims don’t always report hate crimes, means that data likely understates the problem.

So CAP mined a different federal data set: the Bureau of Justice Statistics’ National Crime Victimization Survey. The group used the government’s own methodology to extrapolate a national trend based on that 90,000-person survey, though it, too, suffers from limitations thanks to the fact that it relies on victim descriptions of crimes.

They found that, of the more than 1.2 million hate crimes from 2010 through 2014, just over half were racially motivated. About a third were driven by ethnicity, while religion, sexual orientation and gender were next most common. Of the 43,000 gun-related hate crimes, slightly more involved race while just under half involved ethnicity.

CAP, which was founded by Hillary Clinton campaign chairman John Podesta, offers a solution to the problem in its report: ban anyone convicted of a hate crime from buying and owning a gun.

Most states have some hate-crime law on the books, according to research conducted by the Anti-Defamation League, a civil rights organization that fights against anti-Semitism. (Just five have none: Arkansas, Georgia, Indiana, South Carolina and Wyoming.) But only a handful have the policy CAP advocates for in the report. Just Minnesota, Oregon and New Jersey bar those convicted of hate crimes from gun possession.

Cicilline knows the uphill battle he faces in the Republican-controlled Congress, but he plans to introduce a federal version of that ban on Wednesday.

“I think we just have to keep fighting for this. I think the public expects us to get something done,” said Cicilline, who has a long history pursuing gun control and, as mayor of Providence, was a founding member of Mayors Against Illegal Guns.

Even if Cicilline and CAP were to succeed in passing a ban, its future will depend on whether authorities can enforce it well — something they failed to do at least once before.

Roof’s prior admission to committing a drug crime should have triggered an automatic rejection of his firearm purchase, but he was able to buy the gun used in the church attack due to a lapse in the FBI’s background-check system.

Related stories: