Six people were killed in the two separate but related shootings on Wednesday - including the suspect who killed himself after being confronted by a sheriff's deputy, officials said.
The gunman was identified as 54-year-old Javier Casarez, who used a .50-caliber handgun in the shooting spree.
According to the sheriff, the suspect's ex-wife, 45-year-old Petra Maribel Bolanos De Casarez, was among the victims.
Caserez had filed for divorce from his wife last December, according to documents obtained by ABC affiliate KERO-TV in Bakersfield.
He told the court that he was filing for divorce because he believed his wife was cheating on him.
He also asked the judge for access to some of his wife's text messages, but the judge denied the request.
The divorce was finalized on June 14, but they were due to return to court for issues involving child support, spousal support and property control, KERO reported.
The couple had three children together.
The deadly series of events was first reported around 5:20 p.m. when deputies responded to a trucking company on a report of shots fired.
BODYCAM VIDEO: Deputy confronts gunman in deadly Bakersfield shooting spree
Casarez's estranged wife and 50-year-old Manuel Contreras were shot by Javier Casarez after the gunman confronted Contreras at the business. Casarez then chased 50-year-old Antonio Valadez from that scene and killed him in front of a sporting goods store. The shooter then went to a residence and killed 32-year-old Laura Garcia and her father, 57-year-old Eliseo.
The daughter may have been shot when she tried to intervene, investigators said.
Family members described Garcia as a loving mother of four who will be missed by all who knew her. KERO-TV also identified Garcia's father, self-employed truck driver Eliseo Garcia, as another victim. The station said family members described him as a husband, father and grandfather.
MORE: 6 dead, including suspect, in Bakersfield shootings, police say
The suspect then went to Fillmore Avenue, where he hijacked a vehicle. A woman and child in the vehicle escaped safely.
The suspect drove down Edison Highway to a friend's business, where a deputy saw the suspect and confronted him. The suspect then shot himself in the chest and died at the scene. The deputy did not fire in the confrontation.
At a Thursday morning press conference, Kern County Sheriff Donny Youngblood released body-camera footage that shows the armed deputy approaching Casarez before the suicide.
"Put the gun down," the deputy is heard repeating at least four times. Casarez then pulls the trigger.
Authorities said all of the killings took place within a span of 30 minutes.
It's unclear to investigators how all the victims may be connected in the case.
Officials were executing search warrants at multiple locations and interviewing at least 30 witnesses.
ABC News contributed to this report.