CNN  — 

On Wednesday, during CNN’s town hall with survivors of last week’s mass shooting at a high school in South Florida, National Rifle Association representative Dana Loesch lamented the holes in the FBI’s National Instant Background Check System, or NICS.

“This madman passed a background check. How was he able to pass a background check? He was able to pass a background check because we have a system that’s flawed,” Loesch said on stage. “It is not federal law for states to report convictions to the NICS system. It is not federally mandated. That’s the big question, and I wish that this network had also covered this more.”

Dana Loesch at the CNN town hall

In fact, it was the NRA that led the effort to block the federal mandate, by financing and arguing the US Supreme Court case that let states off the hook. The 1997 decision in Printz v. United States threw out part of the Brady Handgun Violence Prevention Act, and made it optional for local courts, police departments and states to submit background information on residents.

The Brady Act, passed in 1993, established the federal system that screens firearm purchases at licensed dealers. While the FBI built its high-tech NICS system, local police were tasked with conducting the background checks.

However, the NRA teamed up with local sheriffs in Montana and Arizona to challenge the law, saying local law enforcement shouldn’t be forced to work for the feds.

In 1997, the Supreme Court sided with the NRA and Ravalli County Sheriff Jay Printz of Montana. Justice Antonin Scalia wrote the court’s opinion, which was largely driven by the concepts of federalism. The Constitution’s 10th Amendment limited the federal government power over state and local governments, the court decided.

When the FBI finally got the NICS system up and running in 1998, states submitted criminal and mental health records only voluntarily. Now, decades later, it’s still optional.

“The Printz decision says you cannot ‘commandeer’ state officials to operate a federal program. Being forced to transmit information to the federal government would fall under Printz. Printz is the reason why this cannot be mandated,” said Eric Columbus, a former Justice Department official who encountered similar 10th Amendment issues while developing policy during the Obama administration.

States cannot be forced to turn over records that prohibit firearm purchases – like felony convictions, misdemeanor convictions of domestic violence, or involuntary commitments to mental health institutions. To work around that, the Justice Department offers local agencies incentives to do so in the form of federal grant money. Some have used the money to improve public internet access to court records, which are used by FBI NICS examiners.

But the system is still incomplete. When a prospective gun buyer’s name is submitted for a background check, NICS staffers have only three days to compile any outstanding records. If their work is not concluded by then, gun shops are allowed to sell the weapon to the buyer anyway.

The resulting gaps in the nation’s background check system is costing lives. The white supremacist shooter who killed nine people at a black church in Charleston, South Carolina, in 2015 was able to buy a Glock pistol because the FBI did not have a record of his drug arrest.

The NRA did not respond to questions from CNN about this issue.

On Thursday at CPAC, the Conservative Political Action Conference, the CEO of the NRA delivered a speech that again criticized gaps in the background check system.

In his speech, Wayne LaPierre played a video he put out three years ago, in which he said, “For God’s sake, put every prohibited person in the system. That’s what common sense gun laws look like.”

LaPierre went on to blame Democratic politicians and major news organizations for the incomplete record system. “When another monster slips through the cracks, the very cracks that they have enabled in the system, as the records of prohibited persons remain out of the database, it will happen again,” LaPierre told the CPAC crowd.

With the Printz decision in place, some legal scholars doubt that the US Congress could pass any law to make the FBI’s databases complete.

“I think that Printz does constrain information sharing mandates, as well as other mandates. It certainly established a rule that the federal government cannot force states to help them enforce federal law, including forcing them to do background checks,” said Ilya Somin, a professor of law at George Mason University who writes about limits on federal government.

The Supreme Court didn’t directly address the possibility of a state mandate to report to the federal database, leaving open another legal avenue. Local courts and governments could be forced to send data to the FBI – but each one of the nation’s 50 states would have to pass that law itself.

CNN’s Collette Richards contributed to this report.