The fatal shooting of Downey police Officer Ricardo Galvez rattled nerves among cops across the area Thursday as authorities investigated what led to the killing.
The LAPD, for example, stepped up security at its stations even though a department spokesman said the Downey shooting appeared to be an isolated incident.
Galvez's killing turned out to be an armed robbery in which the suspects said they didn't realize the 29-year-old — who was out of uniform and sitting in his personal car near the Downey Police Department — was a cop, authorities said later in the day.
But for police officers, the idea of being targeted because of their job has long been a fear that comes with the job.
There have been several cases in which gunmen specifically targeted Southern California law enforcement.
Shooting of CHP Officer Thomas Steiner
In 2004, a 16-year-old killed a California Highway Patrol officer in a drive-by shooting to prove himself to a Pomona street gang.
The boy told police he had not targeted Officer Thomas Steiner, but had wanted to shoot any police officer he could find.
"This was the ultimate hate crime — the random assassination of a law enforcement officer solely based on the victim's status in the community and a uniform worn," Los Angeles County Dist. Atty. Steve Cooley said at the time.
Assassination of LAPD Detective Thomas Williams
In another case, LAPD Detective Thomas Williams was fatally shot in 1985 in front of his young son at the boy's school to prevent the officer from testifying in a trial.
Seventeen bullets from an automatic weapon were fired at Williams as he picked up his son from a day-care center at Faith Baptist Church in Canoga Park, prosecutors said. Williams was struck by eight of them. The boy was not injured.
Police and prosecutors called the shooting an act of vengeance in which robbery suspect Daniel Jenkins struck back at Williams for testifying against him at a robbery trial earlier that day. Jenkins was accused of holding up a North Hollywood theater manager while he was dropping off theater proceeds at the Valley Plaza branch of the Bank of America in October 1984.
Christopher Dorner's Southern California rampage
More recently, there was the case of Christopher Dorner.
In his weeklong rampage across Southern California, Dorner killed two police officers and the daughter of a Los Angeles Police Department captain and her boyfriend.
In a manifesto written on his Facebook page, Dorner said that he was discriminated against because of his race and unfairly fired from the department, and that he sought retribution against those who wronged him.
Last year, a man who posted anti-police rants online fatally shot two New York City policemen as they sat in their patrol car. Officials said that the attack was random and that the gunman targeted the officers because they were cops.
This summer across the nation, a series of police killings raised alarms. Two Louisiana officers were killed in separate incidents, and two officers in Mississippi died when they came under fire during a traffic stop.
According to the National Law Enforcement Officers' Fund, there have been 111 other police killings this year, compared with 101 in 2014.
In the Downey shooting, two men and a 17-year-old boy were arrested and admitted to trying to rob Galvez, said Lt. John Corina of the Los Angeles County Sheriff's Department.
Homicide detectives are not looking for any other suspects, he said, and detectives have recovered a handgun that they believe was used in the deadly shooting.
"There was nothing indicating that he was a police officer when he was shot," Corina said. "I don't think he even really saw these guys coming up on him."