When confronted, he turned the gun on himself and killed himself.
The tragedy unfolded after Casarez arrived at a trucking company in southeast Bakersfield at around 5:18 pm, accompanied by his wife, Petra Casarez, Youngblood said.
Other than the gunman's wife, it was unclear whether the victims had any connection to the gunman.
Local media are reporting the man approached the trucking business and shot a man before shooting his wife.
Last week, a gunman killed three people at a bank in downtown Cincinnati before he was shot to death by police.
The gunman fled the area, going to a nearby residence and fatally shooting two more people.
"Then I saw a guy with a gun, shooting", said the witness, who declined to be identified.
TROPICS: Helene, Florence to become hurricanes this weekend
At its present course and speed, the center of Florence will likely approach the SC or Georgia coastline on Thursday or Friday. A number of tropical storms in the Atlantic Ocean, with the potential to strengthen to hurricanes, are heading towards land.
Youngblood said he would consider it a mass shooting, saying that the string of shootings were "certainly" connected. The sheriff says Casarez did not have a history of violent crime.
The gunman used a five-shot.50-caliber handgun that had to be reloaded during about half-hour of violence at several locations Wednesday evening. Obviously, there was a kind of situation that caused the husband to be extremely upset. Below you can see the body cam video of sheriff's deputies confronting the gunman.
He then carjacked a woman on Filmore Street who was driving her child.
T&T Trucking, where the initial shooting happened, said in a statement that the company "is in a state of mourning".
The gunman and his ex-wife had been divorced four months, and she had just filed for a new hearing regarding child support and property values, Youngblood said Thursday. The husband at shot and killed his wife and the man.
About 30 people witnessed the shootings, authorities said. Casarez told the woman he wasn't a 'bad person' and let her and the child out of the auto before he drove to Edison Highway, where he was spotted by a deputy, officials said.
Casarez then pursued a third victim from the scene, 50-year-old Antonio Valadez and killed him, Youngblood said.