By MICHAEL S. SCHMIDT and CHARLIE SAVAGE
CLARKSBURG, W.Va. — Nearly two decades after lawmakers began requiring background checks for gun buyers, significant gaps in the F.B.I.’s database of criminal and mental health records allow thousands of people to buy firearms every year who should be barred from doing so.
The database is incomplete because many states have not provided federal authorities with comprehensive records of people involuntarily committed or otherwise ruled mentally ill. Records are also spotty for several other categories of prohibited buyers, including those who have tested positive for illegal drugs or have a history of domestic violence.
While some states, including New York, have submitted more than 100,000 names of mentally ill people to the F.B.I. database, 19 — including New Jersey, Pennsylvania, Vermont, Maryland and Maine — have submitted fewer than 100 records and Rhode Island has submitted none, according to federal data compiled by Mayors Against Illegal Guns. That suggests that millions of names are missing from the federal database, gun control advocates and law enforcement officials say.
“Until it has all the records of people out there in the country who have been deemed too dangerous to own a firearm, the background check system still looks like Swiss cheese,” said Mark Glaze, director of the group. The gaps exist because the system is voluntary; the Supreme Court ruled in 1997 that the federal government cannot force state officials to participate in the federal background check system. As a result, when a gun dealer asks the F.B.I. to check a buyer’s history, the bureau sometimes allows the sale to proceed, even though the purchaser should have been prohibited from acquiring a weapon, because its database is missing the relevant records.
While the database flaws do not appear to have been a factor in the Newtown, Conn., school massacre, they have been linked to other attacks, including the Virginia Tech mass murder in 2007. In that case, a Virginia state judge had declared the gunman mentally ill, but the record of that proceeding was not submitted to the F.B.I. He was able to pass a background check and buy the weapons he used to kill 32 people and wound 17 others.
Since then, Virginia has increased its submissions to the F.B.I. But other states have not taken similar steps because of lack of political will, technical obstacles and state privacy laws, according to Mayors Against Illegal Guns, which conducted a survey of states last year about their compliance. Mayor Michael R. Bloomberg of New York is a co-chairman of the group.
A July report by the Government Accountability Office, the nonpartisan Congressional watchdog, found that the total number of mental health records submitted by states to the background check system increased to 1.2 million from about 126,000 between 2004 and 2011, but that the increase largely reflected the efforts of just 12 states. And, it found, 30 states were not making noncriminal records — like positive drug test results for people on probation — available to the system.
Charles H. Ramsey, the police commissioner in Philadelphia, said the system needed to be strengthened immediately. “There is a lot of data sitting in different places, and we need to be able to access it in a timely fashion,” he said. “It ought to be a top priority now.”
The gaps in the database have exacerbated the effect of a loophole that results in violent felons, fugitives and the mentally ill being able to buy firearms when the F.B.I. cannot determine the person’s history during a three-day waiting period.
Roughly 97 percent of the time, specialists said, the F.B.I. can provide an instant answer, but sometimes an ambiguity — an arrest record that does not say whether someone was convicted, or a common name — requires calling local courthouses to track down the information.
That can cause delays as local officials search through records, some of which are not yet digitized, law enforcement officials said. If the F.B.I. investigation is not completed within the waiting period, would-be gun buyers are permitted to go ahead.
Since 2005, 22,162 firearms — including nearly 3,000 this year — have been bought after the waiting period by people later determined to have been disqualified because of their criminal and mental histories, according to an examination of F.B.I. data.
Some of the weapons were used in violent crimes, including a fatal drive-by shooting, but it is not clear how many were linked to criminal acts, because authorities are barred by Congress from tracking such information.
Many of the guns were not swiftly confiscated by the Bureau of Alcohol, Tobacco, Firearms and Explosives, as federal law requires, according to current and former federal law enforcement officials and government documents. It could take weeks or months to collect them, if ever, the officials said, because the agency is too thinly stretched to make retrieval a high priority.
The bureau and several of its agents said in interviews that they focused on trying to recover firearms from felons who had recently committed a violent crime or were under a restraining order. But Scot Thomasson, a former chief of the A.T.F.’s firearms operations division who retired this year, said that Congress, facing pressure from gun lobbyists, had made it hard for the agency to do its job by restricting its funding, forcing tough decisions.
“If you are an agent and are hot on the trail of a guy who killed a lot of people,” he said, “you are not going to turn around and work on one of these cases.”
Some gun shops say they sell to buyers who have not been cleared in the three-day window, including Bass Pro Shops, which has 58 stores in the United States. “We follow the law,” said Larry L. Whiteley, a spokesman. But if a buyer is “jittery or acting funny,” he said, “we won’t sell them the firearm.”
Other businesses — including the country’s largest gun dealer, Walmart — say they do not sell firearms to buyers if the F.B.I. has not responded in the three-day window. Dennis Pratte, owner of the NOVA weapons store in Falls Church, Va., said, “We are just as concerned about firearms getting into the wrong hands as the state police or the F.B.I.”
After the school shooting in Newtown, in which 20 first graders and six adults were killed, pressure has mounted on President Obama and lawmakers to strengthen federal gun laws. On Wednesday, Mr. Obama said Vice President Joseph R. Biden Jr. would lead a task force to propose ways to limit sales of assault weapons and close loopholes.
That probably will focus attention on the F.B.I.’s National Instant Criminal Background Check system, which was required by the 1993 Brady background-check law.
At an office building in Clarksburg, W.Va., servers and backup drives hum in a huge basement. Upstairs, workers with headsets sit in cubicles, taking calls from gun dealers across the country. In 2012, about 17 million background checks have been done through the F.B.I.’s system.
The background check requirements apply only to licensed dealers, not the private sellers who account for an estimated 40 percent of sales. Restrictions imposed by Congress on government tracking of firearms make it hard to know exactly how many weapons are sold each year, but according to the A.T.F., more than five million firearms are manufactured each year for sale in the United States, and about three million more such weapons are imported. Those numbers do not account for the sale of used guns.
After the Virginia Tech shooting, Congress enacted a law designed to improve the background check system, including directing federal agencies to share relevant data with the F.B.I. and setting up a special grant program to encourage states to share more information with the federal government. But only states that also set up a system for people to petition to get their gun purchasing rights restored were eligible under the law — a key concession to the National Rifle Association — which proved to be an extra hurdle many states have not yet overcome.
While the law also allowed the Justice Department to withhold some general law enforcement grant money from states that did not submit their records to the system, the department has not imposed any such penalties, the G.A.O. found. After the January 2011 mass shooting in Tucson that left Representative Gabrielle Giffords seriously wounded, the Justice Department developed a blueprint to close the holes in the background check system, including steps that could be taken by executive order and not require Congressional action. But the recommendations were largely shelved at the time because the political atmosphere was deeply hostile to new gun control steps.
Lawmakers and groups for gun control have pushed a bill called the Fix Gun Checks Act, co-sponsored by Representative Carolyn McCarthy and Senator Charles E. Schumer, both New York Democrats, to resolve many of the problems. Their proposals, however, have faced stiff opposition from gun rights advocates. This week, Ms. McCarthy, whose husband died in a mass shooting on the Long Island Rail Road 19 years ago, called for her legislation to move, saying the Newtown schoolchildren massacre had changed the political environment.
“There’s always sadness after a mass shooting — there’s public mourning,” she said. “But this time I’m also seeing a lot of anger. Anger from people fed up with gun violence in America. Anger from people fed up with the gun lobby’s tactics in Washington. And anger from people fed up with the lack of courage that too many of the politicians here have.”