A man suspected in a Los Angeles-area shooting spree that killed four people and injured two others was taken into custody Thursday, law enforcement officials said.

Gerry Dean Zaragoza, 26, is accused of fatally shooting his father and brother at a San Fernando Valley apartment before killing his ex-girlfriend at a gas station in North Hollywood, Los Angeles authorities said.

He then is thought to have killed someone on a bus as police were searching for him during the 12-hour manhunt, Los Angeles police said.

This undated photo released by the Los Angeles Police Department shows Gerry Dean Zaragoza. Los Angeles Police Department via AP

Zaragoza was arrested around 2 p.m. in the Canoga Park neighborhood, and a gun was recovered during the arrest, police said. A motive in the four killings is still being investigated.

The first report of a shooting came in around 1:20 a.m. and officers found two men, one 56 and one 33 years old, dead and the suspect's mother wounded, LAPD Capt. William Hayes, commanding officer of the robbery-homicide division, told reporters at a news conference.

Law enforcement officials said two men found dead were Zaragoza’s father and brother.

About an hour later, at a gas station, Zaragoza allegedly shot and killed two employees: a woman — who officials said is thought to be his ex-girlfriend — and another station employee at a parking lot, Hayes and officials said. The other worker survived his gunshot wounds, Hayes said.

At 7:20 a.m., Zaragoza approached a man at a bank ATM and tried to rob him at gunpoint but the robbery was unsuccessful and Zaragoza fled, Hayes said.

Around 1 p.m., the suspect was on a bus and is accussed of fatally shooting another man, Hayes and officials said.

"There's no apparent belief that he knew that individual," Hayes said, but he cautioned that the investigation is in its early stages.

Riders were getting off a bus in Van Nuys when they heard gunshots and discovered the fatally wounded victim, the Los Angeles County Metropolitan Transportation Authority said in a statement.

Hayes said that plainclothes officers were on the lookout for Zaragoza, and he was arrested with a "small use of force." Other officials said a Taser stun gun was used in the arrest.

LAPD detectives and agents with the Los Angeles Fugitive Task Force, which includes the FBI, along with the LAPD Special Investigations Section tracked down the suspect on Canoga Avenue, officials said.

The suspect was armed when he was arrested and the gun found is a similar make and caliber as the one thought to have been used in the killings, but forensic tests will determine if it was the weapon used, Hayes said.

Michael Ramia, the boss of the suspect's father, said the father "told me his son was, like crazy. Not violent, but crazy," NBC Los Angeles reported. Ramia also said the suspect's father said his son had a substance abuse problem, the station reported.