PASADENA — A terrified family of six found themselves in the midst of a hail of bullets Saturday afternoon when they arrived home near the beginning of a shooting rampage began that left three people dead and two others wounded.

Sandra Barraza, 37, her husband, Alfredo Garcia, 41, and their four children had just returned from the store when they noticed a police SUV and a patrol car parked in front of their house, Garcia said.

They did not see the body of a woman who had been fatally shot lying behind a tree across the street, or the body of a man who also had been shot to death just up the street.

Suddenly, a group of police officers carrying rifles yelled to the family to get inside.

“We took two steps, and the shooting started,” said the couple’s 18-year-old daughter, Melissa Perez. Also in the driveway were Perez’s 12- and 15-year-old brothers and her 16-year-old sister.

An officer fled to cover behind the police SUV as the gunman, later identified by police as 44-year-old John Izeal Smith of Pasadena, continued shooting, riddling the vehicle with bullets. The family stood directly behind the SUV when the gunfire began.

Bullets flew on both sides of the family’s driveway as they ran for their home, Sandra Barraza said. Her husband added that he could see smoke rising from the AK-47-type rifle wielded by the gunman as he fired from the front lawn of the home across the street.

“It was horrible. Like a movie scene,” Barraza said. “I was so scared. He was right in front of us.”

The officer remained pinned down by the gunfire for about 10 minutes, until fellow officers placed an armored vehicle between him and the gunman to allow him to escape, Alfredo Garcia said.

The gunman walked up and down the street for about 20 minutes, periodically firing from his rifle before holing up back in the home where the incident began.

For another tense half-hour, police with rifles swarmed the neighborhood.

“There were officers on our roof,” Barraza said.

The family said they breathed a sigh of relief when they saw the shooter being led away in handcuffs. Smith surrendered to police within an hour of the first gunfire after being persuaded to do so by a police dispatcher he was speaking with by telephone, police said.

Coroner’s officials Sunday released the name of one of three people killed in Saturday’s mass shooting in the 1700 block of North Summit Avenue. Two other people were also wounded in the shooting.

Otto Warmbier was arrested in January 2016 at the end of a brief tourist visit to North Korea. He had been medically evacuated and was being treated at the University of Cincinnati Medical Center when he died at age 22.