An armed man opened fire at a bar in the suburbs of Los Angeles late on Wednesday, killing 12 people including a law enforcement officer and injuring many others, police said.

The suspect, identified as Ian Long, a 28-year-old Marine Corps veteran, was found dead inside the bar in Thousand Oaks, about 70 kilometers west of downtown Los Angeles.

[Getty/Kyodo]

The Borderline Bar and Grill was packed with hundreds of young people as a popular country music event for college students was under way at that time, reports said.

CNN reported that 21 others were injured. Authorities are investigating the political background and possible terrorism links of the gunman who killed himself.

The Los Angeles Times said Long had been armed with a Glock .45-caliber handgun and a smoke device, and fired at least 30 shots, citing a law enforcement source who spoke on condition of anonymity.

Ventura County Sheriff Geoff Dean said the first report of shots came around 11:20 p.m. local time and one of the victims was a responding sheriff office's deputy.

"It's a horrific scene in there. There is blood everywhere," he told reporters. "We have no idea if there is a terrorism link to this or not."

Thousand Oaks is known as a quiet, upscale residential suburb with a number of colleges located nearby.

Roads surrounding the bar where the shooting took place have been blocked off as authorities, including local police and Federal Bureau of Investigation agents, comb through the crime scene.

The latest eruption of gun violence comes in the wake of similar mass shooting incidents in the United States, including a case in late October when a gunman killed 11 worshippers at a synagogue in Pittsburgh.