UC Santa Barbara drive-by shooting

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.

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.

Update: Sheriff's officials on Saturday identified the gunman as Elliot Rodger, 22, the son of a Hollywood director.

Police described how Rodger went from one location to another near the campus of the University of California, Santa Barbara, firing for 10 minutes on random people. Brown said he had three legally purchased guns and more than 400 rounds of unspent ammunition in his car.

The rampage mirrored threats made on a YouTube video posted Friday night, authorities said.