The two officers were responding to an unrelated radio call and driving slowly in a neighborhood when they saw two men on a sidewalk and the flash of a rifle being fired, police said.
The officers stopped their car, and one got out and returned fire as the men fled. Police found one suspect, uninjured, a short time later along with a rifle and another weapon.
Police searched the neighborhood throughout the night for the other suspect, warning nearby residents to stay in their homes. Police stopped the search early Monday after the suspect was not found.
Chief Charlie Beck said at a news conference Monday that he was concerned that people might be targeting officers but added that the neighborhood had been marred by gang violence during the past several months and there had been a significant number of gang shootings.
The shooting comes as protesters in California and across the country have rallied for weeks against police killings of unarmed black men in Missouri and New York.
The killing of two New York City officers in their patrol car has departments on edge across the country.
The New York gunman ambushed the officers then killed himself after posting threats online, including references to the fatal shooting of 18-year-old Michael Brown in Ferguson, Missouri, and the chokehold death of Eric Garner in New York City. Both were killed by white officers.