Police in California say the gunman who allegedly killed four people at an office complex yesterday, including a 9-year-old boy, locked the gates before the attack to prevent officers from gaining access.
At a media conference today, authorities identified the suspect as 44-year-old Aminadab Gaxiola Gonzalez.
Orange Police Lieutenant Jennifer Amat said he had a "business and personal relationship" with the victims.
"It appears all of the adults were connected, either by business or by a personal relationship, and this was not a random act of violence," Amat said.
"The child is believed to be the son of one of the victims who worked at the business."
The shooting happened in and nearby a counselling business named Unified Homes. When police arrived on the scene at about 5.30pm, they found the way inside had been blocked.
"Officers immediately approached the building, however were unable to enter the courtyard due to the fact the gates had been locked from the inside," Amat said.
"It appears the suspect used a bicycle-type cable lock to secure the gates from the inside on both the north and the south sides of the courtyard.
"Two officers engaged the suspect from outside of the gates."
Eventually, they managed to "force entry" to the courtyard and the suspect was taken into custody. The officers found two victims in the courtyard, including the young boy, who was already dead.
"It appears that a little boy died in his mother's arms as she was trying to save him," Orange district attorney Todd Spitzer told reporters.
The second victim, a woman, was injured. Both she and the suspect were taken to hospital, where they are currently in critical but stable condition.
Police went on to conduct a "systematic search" of the complex, and they found three more victims, all of whom were deceased: a woman "upstairs on an outdoor landing", a man inside an office, and a woman inside another office.
They also discovered a semi-automatic handgun, along with a backpack containing pepper spray and handcuffs, all of which are believed to belong to the suspect.
The victims are yet to be identified.
The scene was stabilised by 7pm and there was no longer a threat to the public.
Orange, a city of about 140,000 residents, is located about 48km southeast of downtown Los Angeles.
The shooting marked the third mass shooting in the US in the past two weeks, following one in Atlanta that left eight people dead and another in Boulder, Colorado, that left 10 dead.
Orange police said Wednesday night's shooting there was the deadliest since 1997, when four state transportation employees were killed in a work yard by a former co-worker.