Seven people have been killed and seven others wounded in a shooting in Santa Barbara, California.

Police said the gunman was among the dead following the shooting in the town of Isla Vista, near the campus of the University of California at Santa Barbara.

Driving a black BMW, the suspect opened fire on pedestrians from his vehicle at several locations in the town on a busy Friday night.

Police received their first emergency calls about the shooting around 9.30pm last night (5.30am Irish time today).

Twice, the shooter exchanged gunfire with police from his car, and fled both times.

He then crashed into a parked vehicle.

When police approached him they "determined that the suspect ... was dead of an apparent gunshot wound to the head," Santa Barbara County Sheriff Bill Brown said.

Police recovered a handgun from the suspect's vehicle.

Authorities believe that the shooter acted alone.

Police are "analysing both written and videotaped evidence that suggest this atrocity was a premeditated mass murder," Sheriff Brown told reporters.

Authorities have not yet released the suspect's name.

"We have identified nine separate crime scenes," Sheriff Brown said, describing the situation in the streets of the college town at an early morning press conference as "chaotic."

Police said a video titled "Elliot Rodger's retribution" appeared to be connected to the attack, although officials would not confirm if Elliot Rodger was the suspect in the shooting.

In the recording, posted on YouTube yesterday, Mr Rodger sat in his car, looked directly at the camera and declared "the day of retribution" was coming.

The 22-year-old went on: "For the last eight years of my life, ever since I hit puberty, I've been forced to endure an existence of loneliness, rejection and unfulfilled desires all because girls have never been attracted to me."

He complained that he had been at college for more than two and a half years but was still a virgin and had never kissed a girl.

Mr Rodger added: "All you popular kids, you've never accepted me and now you'll pay for it."

On his online blog, Mr Rodger wrote that he was born in the UK and moved to the United States when he was five and was attending college in Santa Barbara.

In a post dated 16 April, he wrote: "Being lonely in a beautiful place like Santa Barbara is truly a horrible experience.

"As I've said many times, a beautiful environment can be the darkest hell if you have to experience it all alone, especially while having to watch other men walking around with their girlfriends.

"I wish girls were attracted to me. I don't know why they aren't."