Ian David Long, a former Marine gunner, legally purchased a Glock 21 that he used to kill 12 others at a bar Wednesday night in Thousand Oaks, according to the Ventura County Sheriff's Office.
Long also had an extended magazine for ammunition, but the Sheriff's Office said further analysis was needed to determine how many rounds it could hold.
California law allows the sale and possession of ammunition magazines holding up to 10 rounds.
But if the magazine held more than 10 rounds, Long, who was 28, would not have been able to legally purchase it in California.
California in 1999 banned the sale or import of magazines capable of holding more than 10 rounds, though gun owners who already owned higher-capacity magazines at that time were permitted to keep them.
Two years ago, California voters and state lawmakers made it illegal even to possess a firearm magazine capable of holding more than 10 rounds.
Sponsored Video Stories from LifeZette
The California Rifle & Pistol Association successfully challenged that law, persuading a federal judge in San Diego in 2017 to prevent it from taking effect.
The 9th U.S. Circuit Court of Appeals upheld the preliminary injunction in a 2-1 vote in July.
Chuck D. Michel, who challenged the law for gun groups and owners, said it would not have stopped Wednesday's rampage.
The 2016 law was intended to remove magazines from people who had them lawfully for decades because they had been grandfathered in, Michel said.