ORANGE, Calif. — A man was charged Friday with murder and attempted murder in a shooting rampage at a Southern California office building that left four people dead, including a 9-year-old boy.

Orange County prosecutors said Aminadab Gaxiola Gonzalez, 44, was charged with the attempted murder of two police officers after firing at them when they reached the scene of the shooting late Wednesday and the attempted murder of a woman who was wounded but survived. Authorities said Gaxiola had chained the gates to the business complex closed with bicycle cable-type locks before the attack.

“The taking of the life of another human being is the most serious of crimes and the slaughter of multiple people while they were essentially locked in a shooting gallery is nothing short of terrifying,” District Attorney Todd Spitzer said in a statement.

Gaxiola was expected to be arraigned Friday from the hospital, where he was in critical-but-stable condition. He was shot during the onslaught, and authorities are investigating whether he was hit by police or self-inflicted gunfire.

It was not immediately known who his attorney would be.

Authorities identified the people killed in the attack on the office of Unified Homes, a mobile home brokerage business, as Luis Tovar, 50; Leticia Solis Guzman, 58; Jenevieve Raygoza, 28; and Matthew Farias, 9. They said the suspect and adult victims had business and personal relationships with each other, and the shooting was not a random act of violence.

But Matthew, a third grader from the nearby city of Santa Ana, was in the wrong place at the wrong time, said Zef Farias, the boy’s uncle. Usually, the humble boy who loved bike riding and his dog went to day care, and Farias said he didn’t know why he was at the office with his mother, Blanca Tamayo, who works for Unified Homes and was the attack’s wounded survivor. She remains hospitalized, Farias said.

“He normally doesn’t go there,” Farias said, fighting back tears. “They were just part of the collateral damage.”

Law enforcement respond to the scene of a shooting that left four people dead at an office building in Orange County on Wednesday. (Kent Nishimura/Los Angeles Times/TNS)

Credit: TNS

icon to expand image

Credit: TNS

Tovar, the owner of Unified Homes, attended high school in the nearby city of Anaheim and raised his own children there, The Orange County Register reported. His daughter, Vania Tovar, told the newspaper that he coached her and her sisters in soccer when they were younger and was active in their lives.

“Our world is shattered,” she said.

Raygoza was Tovar’s daughter and a mother of two boys, according to a GoFundMe page set up for her family.

Gaxiola, from nearby Fullerton, was staying at a motel in the neighboring city of Anaheim and used a rented car to arrive at the office building on Lincoln Avenue on Wednesday. He chained the front and rear gates to the complex and was spotted on security video wearing a bandana over his face, brandishing a semiautomatic handgun and hauling a backpack that contained pepper spray, handcuffs and ammunition, police said.

Reports of shots fired in the city of Orange sent officers to the scene within two minutes, and they exchanged gunfire with the shooter through the gate before the locks were cut, police said. A man was found dead inside an office, a woman in another office and a second woman was found on an outdoor landing upstairs.

Spitzer said it appears the boy died in his mother’s arms as she tried to protect him from the shooting.

Scott Clark, who is owner of Calco Financial that is two doors down from Unified Homes, said he has seen about 10 people working inside Unified Homes but doesn’t know them well. He said he would sometimes invite Tovar inside his own office to take a break and described him as hardworking.

“He’s there day and night,” Clark said.

The murder charges make Gaxiola eligible for the death penalty. Spitzer has said he has not decided if he will seek it.

The violence was the nation’s third major mass shooting in just over two weeks. Last week a gunman opened fire at a supermarket in Boulder, Colorado, and killed 10. A week before that, six Asian women were among eight people killed at three Atlanta-area spas.

Gaxiola was charged in 2015 in Orange County with cruelty to a child and other counts. He pleaded guilty to misdemeanor battery and served one day in jail. All other counts were dismissed, and the conviction was expunged in 2017, said Lauren Gold, spokeswoman for the city of Anaheim.