A California man went on a shooting rampage in the San Fernando Valley on Thursday, pumping bullets into six people, four of whom he killed — including his own father and brother, cops said.

Gerry Dean Zaragoza, 26, started his “violent spree” in Canoga Park before heading over to North Hollywood, Sherman Oaks and Van Nuys — where he continued to target people before finally being arrested by LAPD officers.

First, Zaragoza allegedly killed his 50-year-old father and 20-year-old brother at an apartment complex on Roscoe Boulevard around 2 a.m., according to police officials.

He also allegedly wounded his mother, but she was expected to survive.

Once in North Hollywood, the young man tracked down his ex-girlfriend and allegedly shot her at a gas station on Vineland, near the Burbank Airport. He also fired a round into a male gas station employee.

Zaragoza’s ex wound up dying, but the worker lived and was rushed to a local hospital with critical injuries.

Hours later, Zaragoza targeted a stranger on a bus in Van Nuys — whom he allegedly shot and killed. Cops said it was unclear what prompted the shooting.

“Once we got to the Woodley Station, that’s when I heard the gunshot and the bus driver opened the door,” said witness Carlos Hurtado de Jesus.

“Once [the driver] opened the door, everybody started running,” he told CBS.

Cops finally caught up to Zaragoza around 3 p.m. Thursday and arrested him. He was also suspected of trying to rob a man who was attempting to use an ATM in Canoga Park just before 8 a.m., but no injuries were reported and nothing was taken.

Residents who knew Zaragoza’s family, including his father Carlos, said the elder Zaragoza would often complain about the young man’s issues.

“He told me about the problems with his son — his drug problems,” said one man, identified only by his first name, Michael.

“His son didn’t want to work, didn’t want to do anything,” Michael told CBS. “I told him to take him to rehab. He told me he was violent in the house. I told Carlos, I said, ‘Carlos, get rid of him. Take him to rehab.’”

Police officials said they had known about Zaragoza’s problems, as well.

“We knew he was a danger to the community,” said LAPD Capt. William Hayes.

However, investigators have yet to discover a possible motive for the attacks.

“It is obviously an individual that went on a violent spree,” Hayes said.