Kern County Sheriff Donny Youngblood said that the shootings began shortly before 5.30 pm (local time) on Wednesday and occurred at a business and a home in Bakersfield, about 90 miles north of Los Angeles, The Associated Press reported.
The gunman then wandered toward a nearby road and approached two people near a home. Sheriff's deputies say a husband and wife went to a business, and the husband shot and killed his wife, as well as a man inside the business.
The fatalities were three men and two women.
"The suspect killed himself", the sheriff said.
Kern County Sheriff Donny Youngblood said they were working to find out how all the people involved are connected, if at all.
The Sheriff's Department said the shootings took only a short period of time and were not random.
Russian Federation launches largest military drill since Cold War
The exercise simulated a "massive missile attack" by an "unnamed enemy", another military official Sergei Tikhonov said. The exercises involve Chinese and Mongolian armies and will continue until September 17.
After that, he hijacked a vehicle from a mother and her child.
Police said a sheriff's deputy spotted the vehicle a short time later on a nearby highway.
Authorities did not release the name of the suspect or victims. Obviously, there was a kind of situation that caused the husband to be extremely upset. He chased a person who had witnessed the shooting and killed that person, too.
Investigators said they will also look at body camera footage from the deputy who confronted the shooter.
The man pulled over after a deputy confronted him with a firearm and then shot himself dead.
The gunman then trained the weapon on his wife, fatally shooting her inside the business as well.