Police were alerted in the evening to an apartment complex, where two men were stabbed. One died on site and the other later died in hospital, the AP writes.

The suspected perpetrator must have been armed with both a knife and a gun. His motive is believed to be "hatred", said Carl Whitney, at the Garden Grove Police Department at a press conference, the AP writes.

"We know this guy was full of anger and he injured several people tonight," Whitney said.

The attack lasted for two hours in the city of Garden Grove and in nearby Santa Ana, south of Los Angeles.

The offender's car, a silver Mercedes, was traced to a 7-Eleven in Santa Ana - where he killed the security guard and another person in a nearby store. He could later be arrested.

Everyone who was killed, including the perpetrator was Spanish-speaking, reports the police at the press conference.