The former Marine who opened fire inside a California bar was armed with a legally purchased, high-powered Glock handgun, officials said.

Shooter Ian David Long, 28, used that weapon — which was fitted with an extended magazine — to kill 12 people, including a responding police sergeant at the Borderline Bar and Grill in Thousand Oaks on Wednesday night.

"The weapon used in this horrific shooting was a Glock 21 .45-caliber handgun," Ventura County Sheriff Geoff Dean told reporters on Thursday morning, hours after the deadly shooting. "The handgun is designed to hold, in California, 10 rounds and one in the chamber."

A Glock 21C 45ACP, Austrian 45 automatic pistol similar to the weapon used by Thousand Oaks gunman Ian David Long. Andia / UIG via Getty Images

It's believed to be the only weapon used Wednesday night by Long, a Marine infantry gunner who served in Afghanistan, officials said.

"The weapon did have an extended magazine on it," Dean said. "We do not know at this time how many rounds were actually in the weapon or how many rounds the magazine could actually hold because it's still being processed as part of the evidence."

Former New York Police Department Commissioner Bill Bratton, an MSNBC contributor, said an extended magazine could have given the killer 30 shots and possibly more if he reloaded at any point during the carnage.