Updated

A suspect in a series of shootings that killed three people and injured four others within an hour in the Los Angeles area was taken into custody after a daylong search.

The man, whose name has not been released, was detained by SWAT officers Sunday night after holing up inside a house in Sylmar for about an hour, Capt. William Hayes said.

"You have three egregious incidents ... horrendous incidents where family members were killed and seriously injured so we wanted to resolve this as quickly as possible," Hayes said.

Witnesses had reported seeing two men in a tan- or gold-colored SUV at two of the three shooting scenes in the San Fernando Valley area. However, Hayes declined to say whether a second suspect remained at large or what led investigators to the house.

Sgt. Frank Preciado, a police spokesman, said a car at the house matches witnesses' description of the vehicle.  He said detectives will search the house for additional evidence.

Police said the victims appeared to be randomly targeted by the same gunman because the same type of weapon was used in the morning attacks and the suspect fired from inside a car.

In the first attack, a family of five was struck by gunfire at 5:50 a.m. in San Fernando as they drove to church. The family had pulled over after noticing the suspect driving erratically when they were shot, Preciado said.

A woman in her 20s was killed, her mother and father were critically wounded and two children suffered minor injuries from either bullet fragments or broken glass, Preciado said.

About 40 minutes later, a man was fatally shot at a Sylmar park.

Then 15 minutes later and less than 5 miles away, a woman in her late 50s was shot in the head as she sat in a parked car by a church. Preciado said she may have been waiting for someone, but he didn't have more details.

The shootings triggered an intense investigation and prompted the Los Angeles Police Department and Los Angeles County Sheriff's Department to step up patrols on the street.

Investigators were looking into whether Sunday's attacks were related to at least two shootings earlier in the week, Preciado said.