The suspect was arrested after the two-hour spree in the Garden Grove. (Representational image)

Four people were killed and two injured in a stabbing and robbery spree across two Southern California communities near Los Angeles on Wednesday, police said.

The suspect, a 33-year-old man from Orange County, California, was arrested after the two-hour spree in the Garden Grove and Santa Ana communities, about 30 miles southeast of Los Angeles, news media reported.

The suspect's name was not released.

Two men were killed in an apartment in Garden Grove and another at a Subway restaurant. The fourth person killed was a 7-Eleven security guard in Santa Ana, police said on Twitter and in media reports.

Police in Garden Grove and neighboring Santa Ana were working on at least 10 crime scenes late on Wednesday, according to police on Twitter.

Police said the suspect also robbed a bakery, a check-cashing business and an insurance office, where a woman was also stabbed, California media reported.

The suspect was arrested at a 7-Eleven at about 6 p.m., police told news media.

"These are all random acts of violence," Garden Grove Lieutenant Carl Whitney said. "Our suspect was not associated with any of the victims."

Representatives from the Santa Ana and Garden Grove police did not immediately return phone calls seeking comment.