But Aaron Alexis, a 34-year-old military contractor and former Navy reservist, managed to exploit loopholes in the nation's patchwork of complicated gun laws designed to keep weapons out of the hands of dangerous people.
He was able to buy a shotgun in Virginia with out-of-state identification, even though that would have prevented him from buying a handgun.
It is illegal for gun dealers to sell handguns to such out-of-state buyers but a 1986 law opened up interstate sales for shotguns and rifles.
Alexis bought the shotgun at Sharpshooters Small Arms Range in Lorton, Virginia, on Saturday, according to the lawyer for the gun range. Michael Slocum said Alexis passed a background check.
In the wake of the mass shooting at Virginia Tech in 2007, state authorities changed laws to make it tougher for the mentally ill to buy guns but Alexis was never declared mentally ill or committed to a hospital. He had been receiving mental health treatment from the Department of Veterans Affairs since August.
Meanwhile, details have been emerging about the victims of Monday's shooting. The three women and nine men ranged in age from 46 to 73 and included retirees, parents, a bird lover and a divorcee.