“Witnesses described the suspect as being a Middle Eastern man in his early 20s with a beard, wearing all black with a hood and his face partly covered.”

Eleven people and a police officer have been killed after a gunman opened fire inside a country-and-western bar in Thousand Oaks, California.

A sheriff’s deputy was killed by the gunman after responding to the shooting at the student-filled Borderline bar and grill.

Authorities said the suspect died inside the bar.

Initial reports indicated that a man had opened fire with a semi-automatic gun at about 11.30pm.

Officers said at least 30 shots had been fired, sending hundreds of panicking people toward the exits with some breaking windows to escape.

The suspect has been described as a Middle Eastern man in his early 20s with a beard, wearing all black with a hood and his face partly covered.

Ventura County sheriff’s Captain Garo Kuredjian said hundreds of people were inside the bar and shots were still being fired when deputies arrived.

It was college night at the bar, with country two-step lessons being offered to Wednesday customers – most of which were university students.

Witnesses say a man fired several shots from a handgun before throwing smoke bombs into the crowded bar in southern California.

People screamed and fled to all corners of the room, while a few people threw barstools through the windows and helped dozens escape.

A trail of blood was visible on the street at the entrance of the venue.

Pictures and video footage show firefighters and first responders flooding the scene after multiple injuries were reported.

A police helicopter swirled overhead and officers surrounded the area with cars.

Tayler Whitler, 19, said she was inside the bar when a man walked in with his face partly covered by something resembling a ski mask.

She said he opened fire on a person working on the door, then began to shoot people at random.

It was really, really, really shocking,” she told KABC-TV. “It looked like he knew what he was doing.”

Officers reported a man matching the suspect’s description on the ground at the scene outside a window following the attack.

He was believed to have been confined inside the bar before being shot dead.

Police told how victims ran to a nearby petrol station to get help shortly after the gunman opened fire.

Video showed causalities being carried out of the bar by members of the public and emergency workers.

Officers escorted large groups of people to safety as they left the area.

Nick Steinwender, student body president at nearby California Lutheran University, rushed to the scene when he heard about a shooting at the bar where he knew friends and fellow students were inside.

“It was chaos, people jumping out of windows, people hopping over gates to get out,” he told KABC-TV.

He said he heard from people inside that they were hiding in bathrooms and the attic of the bar.

The bar is located about 40 miles west of Los Angeles and describes itself as a western-style bar with a spacious dance floor used for theme nights such as country, salsa and swing.

Authorities have urged the public to avoid the area and that roads are being blocked