A shooting rampage that left five people dead in Bakersfield, California, on Wednesday was linked to domestic violence and ended with the suspect turning the gun on himself as deputies closed in, officials said.

A final image of the shooter — identified as Javier Casarez, 54 — was captured on a deputy's body camera and shown during a news conference Thursday in which authorities described how the shooting spree unfolded over less than 40 minutes and spanned five crime scenes.

Kern County Sheriff Donny Youngblood said the shootings appear "to be more than just husband and wife having a fight. Other people were targeted, and there's a reason for that, and we have to find out."

Authorities received their first call at 5:18 p.m. PT (8:18 p.m. ET), Youngblood said. Casarez had taken his estranged wife, Petra Maribel Bolanos De Javier Casarez, 45, to the business T&T Trucking, where he confronted an employee there.

Youngblood said Casarez pulled a five-shot .50-caliber handgun and killed Manuel Contreras, 50, before turning the gun on his estranged wife, killing her.

Kern County Sheriff Youngblood said the firearm the gunman used is one of the “top 5 largest handguns ever made.” They’re still trying to investigate how he obtained it. #BakersfieldMassMurder #BakersfieldShooting pic.twitter.com/eCqRIEQSqb — Karen Hua (@k_hua) September 13, 2018

A third man at the scene — identified as Antonio Valadez, 50 — fled as Casarez fired at him. He was chased to a nearby business, where he was fatally shot, Youngblood said.

At 5:34 p.m, the gunman then drove to another residence where he fatally shot Eliseo Casarez, 57, according to investigators. It's not clear what relationship the shooter had with the victim. Casarez's daughter, Laura Garcia, 31, was killed likely trying to intervene, Youngblood added.

Fifteen minutes later, a woman and her child were carjacked nearby, but the mother persuaded the gunman to let them go and take their vehicle, said Bakersfield police Lt. Mark King. Both were unharmed.

Deputies spotted the car and it turned into a business' parking lot, King said. A deputy was heard in a bodycam commanding Casarez to "put the gun down" before Casarez shot himself in the stomach.

The area of the shooting spree was in unincorporated Bakersfield, which is patrolled by the Kern County Sheriff's Office.

The investigation could take days, Youngblood said, because there are at least 30 witnesses to be interviewed. The bodycam video from the deputy who confronted the shooter also has to be examined.

A motive for the "mass shooting" remained unclear Thursday, but Youngblood said Casarez and his estranged wife had recently been fighting over child support and property. Casarez also may have forced her to go with him to the trucking business.

Youngblood said he was not aware if Casarez was an employee at the business, but for some reason he decided to confront one of the workers there.

"We're trying to substantiate rumors," the sheriff added, without providing further details.

Late Wednesday, as investigators grappled with the burst of violence, Youngblood told reporters that "this is the new normal."

He said Thursday he was referring to "people taking hand guns and shooting people with more than one victim at a time. … It's something I hope we don't become immune to."