Seven people are dead, including a suspect, and another seven people are injured near the University of California at Santa Barbara after a gunman went on a drive-by shooting rampage in a student area Friday night.

The Santa Barbara County Sheriff says the suspect exchanged gunfire with deputies and then drove off and crashed into a parked car.

Deputies found the suspect inside the car dead from a gunshot wound to the head. 

The sheriff says he still does not know if the suspect was shot and killed by deputies or if the wound was self-inflicted. 

A semiautomatic handgun was recovered.

It was not immediately clear what the motive for the shootings may have been.

The shootings occurred at several sites in the town, resulting in nine crime scenes.