Most mass shooters in the U.S. acquired their weapons legally because nothing in their backgrounds disqualified them, reports James Alan Fox, a criminologist with Northeastern University who has studied mass shootings for decades.
But in several attacks in recent years, gunmen got weapons as a result of mistakes, lack of follow-through or gaps in federal and state law.
Not all gun purchases are subject to a federal background check. Even for those that are, federal law has limited reasons to prohibit a person from buying or owning a firearm. You can't buy one if you were convicted of a crime punishable by more than a year in prison, are an addict, were involuntarily committed for a mental health issue, were dishonorably discharged from the military, or were convicted of domestic violence or the subject of a restraining order.
In 2018, more than 26 million background checks were conducted, and fewer than 100,000 people failed. Of those, the vast majority were for a criminal conviction. Only about 6,000 were rejected for a mental health issue.
Here are some of the ways mass shooters acquired their weapons:
MISTAKE IN DATA: CHARLESTON, S.C., CHURCH
The man who killed nine worshipers in 2015 at Mother Emanuel AME Church acquired a handgun because of a mistake in the background database and a lack of follow-through.
Dylann Roof had been arrested on drug charges just weeks earlier. That arrest should have prevented him from buying the pistol he used in the attack. But the FBI examiner reviewing the sale never saw the arrest report because the wrong agency was listed in state criminal history records. After being told she had the wrong agency to review the arrest record and being directed to a different police department, she didn't follow through.
After a three-day waiting period, Roof went back to a West Columbia store and picked up the gun.
FBI examiners process about 22,000 inquiries a day, a Justice Department attorney said during a court case brought by relatives of the church victims.
DATA NOT UPDATED: SUTHERLAND SPRINGS, TEXAS, CHURCH
The man who killed more than two dozen churchgoers in 2017 in Sutherland Springs, Texas, could buy guns because his criminal record was not submitted to the FBI database.
Devin Patrick Kelley purchased four guns from federally licensed dealers in Texas and Colorado. The military veteran passed the required background checks because the Air Force never informed the FBI about an assault on his wife and her child that led to a court-martial, a year of confinement and a bad conduct discharge.
The Air Force acknowledged that in addition to failing to submit the information to the FBI database, it found several dozen other such reporting omissions. The Air Force has blamed gaps in "training and compliance measures" for the lapses and said it made changes to prevent more such failures.
LACK OF ENFORCEMENT: AURORA, ILL., WORKPLACE
When Gary Martin failed a background check and was told to turn over his weapon, he never did, and police didn't confiscate it. Martin killed five co-workers and wounded six others at a suburban Chicago manufacturing plant.
An initial background check failed to detect his criminal record. Months later, a second background check found his 1995 aggravated assault conviction in Mississippi for stabbing an ex-girlfriend.
He was sent a letter saying his gun permit had been revoked and ordering him to turn over his firearm to police. But he never gave up the .40-caliber Smith & Wesson handgun.
Federal law has no mechanism to seize firearms from people. Most states allow police to seize a gun when they encounter a prohibited person, but few states have a procedure to actively retrieve and remove firearms from prohibited people.
A 2018 report by the California attorney general, for example, said more than 20,000 people there have failed to surrender their guns as required. California is one of a few states that seizes firearms from such people. California, Connecticut and Nevada require those people to provide proof they've complied and relinquished their firearms.
PRIVATE PURCHASE: WEST TEXAS RAMPAGE
The gunman who went on a rampage last month along a 10-mile stretch around Midland and Odessa, Texas, killing seven people and injuring about two dozen, had failed a background check in 2014. So Seth Aaron Ator apparently got his weapon through a private transaction. Authorities searched a home in Lubbock that they suspect is associated with the person who supplied the gun.
Under federal law, private sales of firearms — such as between friends, relatives or even strangers — don't have to undergo a federal background check. Laws in 21 states and Washington, D.C., require background checks on some private sales, but Texas doesn't. Maryland and Pennsylvania require a background check for handguns but not long guns.
A study by Harvard University researchers published in 2017 found that 22% of people who obtained a firearm in the previous two years reported doing so without a background check.
While Americans are allowed to make their own firearms, they cannot do so commercially. It is illegal to make and sell guns as a business without being a licensed dealer or manufacturer. Some sales at gun shows also are not subject to a background check.
TOOK FROM RELATIVES: NEWTOWN, CONN.; MARYSVILLE, WASH.; AND SANTA FE, TEXAS
The 20-year-old who gunned 20 first-grade students and six adults at an elementary school in Newtown, Conn., took the firearms he used from his mother's collection. Adam Lanza killed her first in their home before going to the Sandy Hook Elementary, where he carried out his attack in 2012.
In 2014, 15-year-old Jaylen Fryberg killed four classmates and wounded another in Marysville, Wash., before killing himself. He was armed with a .40-caliber Beretta Px4 Storm handgun that he stole from his father. Fryberg's father later was convicted of illegally obtaining the gun for failing to acknowledge on federal firearm forms that he was the subject of a tribal domestic-violence protective order. That order was never sent into the state or federal criminal databases.
Dimitrios Pagourtzis, a 17-year-old high school student in Santa Fe, Texas, is accused of killing eight students and two substitute teachers in 2018 with a shotgun and pistol he took from his father's closet.
LEGALLY ACQUIRED: LAS VEGAS; AURORA, COLO.; ROSEBURG, ORE.; AND ORLANDO AND PARKLAND, FLA.
The man who carried out the deadliest mass shooting in modern U.S. history — the Las Vegas attack that killed 58 people and wounded more than 500 in 2017 — legally acquired 33 of his 49 weapons between October 2016 and Sept. 28, 2017, according to the Bureau of Alcohol, Tobacco, Firearms and Explosives.
The gunmen who carried out attacks at a a movie theater in Aurora, Colo.; a high school in Parkland, Fla.; the Pulse nightclub in Orlando, Fla.; and at Umpqua Community College in Roseburg, Ore., all passed background checks and bought firearms legally.