LOS ANGELES — The gunman who killed 12 people at a Thousand Oaks, California, bar earlier this month had carried seven high-capacity magazines and threw smoke bombs in the attack, officials said Tuesday.

But an exact motive in the Nov. 7 mass shooting at the Borderline Bar & Grill — carried out by 28-year-old former Marine Ian David Long — has still not been determined, Ventura County Sheriff Bill Ayub said at a news conference.

"As to the motive of the suspect, we are no closer to determining that today than we were at the onset of the incident," he said. "Investigators are analyzing information from the suspect's family, friends, and witnesses as well as evidence collected from his home and from the bar. That analysis will take a considerable amount of time."

Long used a .45-caliber Glock handgun which he legally purchased in August of 2016 from a gun shop in the Simi Valley, and fired a total of more than 50 rounds during the shooting, according to Ayub.

Long had seven 30-round magazines, which are illegal in California but can easily be bought in neighboring states, and investigators found five of those magazines fully loaded after Long killed himself, Ayub said.

The gunman also had a flashlight with a laser sight attached to the handgun and he "threw multiple smoke grenades while inside the bar, which contributed significantly to the chaos and confusion inside," Ayub said.

Long entered the bar at around 11:18 p.m. PT that night and "immediately began firing his weapon," Ayub said, and after shooting people inside Long lay in wait for responding law enforcement.

People comfort one another outside a bar in Thousand Oaks, California, where a gunman opened fire late Wednesday. Mark J. Terrill / AP

One of two officers who responded, Ventura County sheriff’s Sgt. Ron Helus, 54, was shot dead by Long.

"The suspect ambushed the officers almost immediately from a position of tactical advantage,” Ayub said. Those two offers returned fire but none of those rounds struck the suspect, he said.

When Helus and the other officer arrived at the scene, more than 100 people were already fleeing the bar, some of whom were jumping through windows to escape, Ayub said.

"As you can imagine, this was a terrifying experience for everyone who was there,” Ayub said. “Confusion and chaos can only begin to adequately describe the situation."

Long shot 13 people in all, only one of whom survived, Ayub said. After Long killed himself, police found more than a dozen people who were still hiding in an attic and in other areas inside the bar, he said.

Long wrote on social media during the attack that he was bored but sane, law enforcement sources have previously told NBC News.

Paul Delacourt, assistant director of the FBI’s Los Angeles field office, said that investigators conducted "hundreds of interviews of victims and witnesses and others that may have known the subject," and that investigators have recovered some digital media which was sent to the FBI lab in Quantico, Virginia.

"At this point, we have no indication of radicalization, but along with the sheriff's department we continue to look to identify any motive," Delacourt said.