A drive-by shooter went on a rampage near a Santa Barbara university campus that left seven people dead, including the attacker, and seven others wounded, authorities said Saturday.

The gunman got into two gun battles with deputies Friday night in the beachside community of Isla Vista before crashing his black BMW into a parked car, Santa Barbara County Sheriff Bill Brown said. The gunman was named by investigators as 22-year-old Elliot Rodger, the Daily Mail reported.

Deputies found him dead with a gunshot wound to the head, but it wasn’t immediately clear whether he was killed by gunfire or if he committed suicide, he said.

A semi-automatic handgun was recovered from the scene near the University of California, Santa Barbara.

Police are investigating a disturbing YouTube video posted that shows a Rodger describing plans to shoot women, which they say appears to be connected to the attack.

https://www.youtube.com/watch?v=sbv5Vpa-B-0

“We’re analyzing both written and videotaped evidence that suggests that this atrocity was a premeditated mass murder,” Brown said.

Police say they believe Rodger had acted alone, the Daily Mail reported. Rodger is thought to be the son of Peter Rodger, assistant director of the Hollywood film franchise The Hunger Games.

The shootings started around 9:30 p.m. in the student enclave reputed for parties, including an annual spring bash that turned into a violent blowout last month. Brown said the shootings occurred at several sites, resulting in nine crime scenes.

A student told KEYT-TV he saw shots fired from a BMW, fatally striking one woman and critically injuring another woman.

“I heard shots, scream, pain,” Michael Vitak said. “All emotions. I hope she is going to be fine.”

A visibly shaken student told the station she was approached by the driver of a black BMW who flashed a handgun and asked “Hey, what’s up?” The student, who didn’t provide her full name, said she thought he was carrying an airsoft gun and kept walking. She said seconds later, she felt something buzz by her head and quickly realized they were bullets.

The victims’ identities were not immediately released. Brown said the injured were being treated for gunshot wounds and traumatic injuries, including at least one person who underwent surgery for life-threatening injuries.

Isla Vista, a roughly half-square mile community next to UC Santa Barbara’s campus and picturesque beachside cliffs, is home to 23,000 people. The area has a reputation for excessive partying. Last month, an annual spring bash spiraled into violence as young people clashed with police and tossed rocks and bottles. A university police officer and four deputies were injured and 130 people were arrested.