When federal grants became available for states to improve background checks for gun buyers after the shooting at Sandy Hook Elementary School in Newtown, Connecticut, in 2012, Chris Duryea knew he had to get one.

For years, Duryea, a court records officer in that state, had been aware of what he considered a possible threat to public safety. Connecticut lacked the resources to enter the names of tens of thousands of people wanted for violating probation or skipping out on a court appearance into the National Instant Criminal Background Check System. The system, known as the NICS Indices, gives gun dealers a way to immediately determine whether they can legally sell a firearm to a would-be buyer.

In 2013, Duryea won the federal grant, and spent about $400,000 to upload tens of thousands of names in the federal database.

Then, this February, Duryea got a letter from NICS. It alerted him that, because of a change in the federal definition of “fugitives from justice,” all the names his staff had uploaded would be purged.

“It strikes me as a high-risk category,” Duryea said of the people with open warrants whose names were removed from his state’s database. “It kind of makes you scratch your head.”

The NICS Indices is one of three databases that background checkers from the Federal Bureau of Investigation consult when someone attempts to purchase a gun from a licensed dealer. It is the only database that is firearm-specific, meaning that authorities who entered the record have affirmatively declared that the person is prohibited from gun ownership. The much larger Interstate Identification Index (III) pools all conviction records, and the National Crime Information Center (NCIC), is a repository of justice-related records such as protective orders or open arrest warrants.

The federal background check system received heightened attention this week, after it was revealed that the gunman who killed 26 people in a Texas church was able to buy his rifle at a licensed dealer, despite a military domestic violence court-martial. The Air Force later acknowledged that it had failed to enter the record into the NCIC database.

In Connecticut, all background-check requests are routed to state police, who run names against both the federal database and their own records. State officials say most of the 52,000 names that were removed from the NICS database earlier this year would still be flagged as prohibited from buying a gun by state police.

The FBI previously considered anyone with an open warrant to be a fugitive, and therefore prohibited from gun ownership. Under the new more restrictive definition — championed by the Bureau of Alcohol, Tobacco, Firearms, and Explosives — only people with arrest warrants who have crossed state lines to avoid prosecution are considered fugitives.

Proving not only that someone with an outstanding warrant left a state, but also why, is extremely difficult, experts agree.

Nationwide, the FBI’s definition change led it to remove about 500,000 records from the instant background-check system. As of September, fewer than 700 names had been put back in the system in the fugitives from justice category, according to the FBI.

This does not mean that half a million people with open arrest warrants may now purchase firearms wherever they please.

The vast majority of the removed records — about 430,000 — came from Massachusetts. Because Massachusetts has a law that prevents anyone with an open warrant from buying a gun, the way the FBI did before February, the state immediately re-entered all the names back into the NICS database as “state prohibitors.”

But those fixes aren’t foolproof. While prohibited buyers may still be blocked from buying a gun in Connecticut, Massachusetts, and other states that have their own prohibitions, those once deemed fugitives by the FBI now have a much better chance of acquiring a weapon across state lines.

Here’s how that might work. Before making a sale, a gun dealer checks with the FBI background-check center, in Clarksburg, West Virginia. An investigator there will query the NICS Indices and two other databases. One of those databases, the FBI’s National Crime Information Center, or NCIC, still includes many of the names removed from the instant-check system, according to experts.

Still, a flag raised by an NCIC check doesn’t work the same way as the instant-check system. If an NCIC check generates a red flag, investigators must call the state that issued the warrant and ask whether there was proof that the person had fled to avoid prosecution. Since it is so hard to prove whether someone with a warrant crossed state lines, many sales will be allowed to go forward with what is known as a “default proceed” sale, experts say. A default proceed allows federally licensed firearms dealers to go ahead with a sale if a background check takes more than three business days to complete.

“Everywhere else, the person can probably buy a gun,” said Anthony Coulson, a former special agent with the Drug Enforcement Administration and an expert on the background-check system. Assurances by state officials that local law enforcement will identify fugitives even if they are removed from the NICS database amount to “a false sense of security,” Coulson said.

Chelsea Parsons, an expert on guns and crime policy at the Center for American Progress, said the number of default-proceed sales is likely to increase nationally as those tasked with checking backgrounds struggle to determine whether a person with an open warrant meets the new definition of fugitive from justice.

“Now we have yet another category under federal law that requires much more investigation at the local level to figure out whether this person is prohibited from buying a gun,” Parsons said.

Dylann Roof, the man convicted of killing nine people at a historically black church in Charleston, South Carolina, in 2015, got his gun through a default-proceed sale.

Even before the definition of fugitive from justice changed in February, lots of people with open warrants were likely to fall through the cracks. Only about 10 percent of states entered the names of people with open warrants in the NICS database before those names were purged, so people with warrants in those states probably were not being instantly flagged to begin with.

In Connecticut, Duryea said he is trying to figure out how to determine which people with open warrants in his state who officials can prove intentionally fled, and how he can get their names back into the system. The process will take time and money, he said.

To do it, he’s looking for another federal grant.