US police have named the alleged gunman who killed five people in linked shootings before killing himself in Bakersfield, California on Wednesday.
Javier Casarez drove his ex-wife Petra Maribel Bolanos de Casarez, 45, to a trucking business in the city, where he killed two men and his estranged wife.
The 54-year-old then drove to a home where he shot dead two more people.
After hijacking a car from a woman with a child in it, Casarez was confronted by a deputy and shot himself dead.
Police identified the other victims as Antonio Valdez, 51, Manuel Contreras, 50, Eliseo Garcia, 57 and his daughter Laura Garcia, 31.
Authorities said there were "strong indications" of a domestic violence background but that they were still investigating motives behind the killings, which took place 145km (90 miles) north of Los Angeles.
At 17:20 local time (00:20 GMT) deputies were called to the trucking business after reports of shots being fired.
Casarez had confronted Manuel Contreras and then allegedly shot both him and Ms Bolanos de Casarez, the mother of his three children, using a handgun, police said.
Antonio Valadez then appeared at the scene and Casarez shot at him, before pursuing him and shooting him dead.
The 54-year-old then drove to a residence on Breckenridge Road and shot dead Eliseo and Laura Garcia.
Police are still investigating the connection between the gunman and his last two victims. They said Laura Garcia, a mother of four, may have tried to intervene.
The alleged gunman then carjacked a car from the woman and child, who were allowed to escape.
Casarez pulled over after a deputy confronted him with a firearm. Police body-cam video shows the officer repeatedly ordering the suspect to drop his weapon before he shot himself in the chest.
Why did this happen?
Police say Casarez was in the midst of divorce proceedings with his ex-wife, who had recently filed for an unspecified change in orders involving child support and property.
"These are not random shootings," Kern County Sheriff Donny Youngblood told journalists.
"Obviously, there is some type of situation that caused the husband to be extremely upset," he said on Thursday. "I'm pretty comfortable [saying] there will be a connection between all these players."
He said police were still investigating the motive behind the shooting of the four other victims.
The entire incident took place over 10 to 15 minutes, Sheriff Youngblood said.
He had earlier described the incident as a mass shooting, saying: "This is the new normal, if you look across the country."
"Six people lost their lives in a very short period of time."