Police on Saturday afternoon arrested a man suspected of killing one police officer and wounding another in Pomona authorities said.
Isaias De Jesus Valencia, 39, was also charged with attempted murder of other peace officers, the agency said in a statement.
Police Chief Michael Olivieri identified the officer who was killed as Greggory Casillas, 30, a rookie still in field training.
"Gregg is a hero, a man to be looked up to," Olivieri said. "He left his family at home to protect yours and his ultimate sacrifice will never be forgotten."
Valencia was arrested after he barricaded himself in an apartment for more than 15 hours.
The incident began Friday night after the suspect evaded police in a pickup, crashed and fled.
"The suspect ran into an apartment complex and the officers gave chase," Capt. Christopher Bergner of the Los Angeles County Sheriff's Department said at a news conference. "As he barricaded himself in a bedroom, officers attempted to contact him. He then began firing through the door, striking the two officers."
Olivieri said Casillas leaves behind a wife and two children. He joined the department in 2014 and worked at several jobs before becoming an officer. He was pronounced dead at the hospital.
Earlier news footage from CNN affiliate KABC showed a heavy police presence, including a SWAT team. At least five gunshots could be heard. Video from the scene also shows officers apparently attempting to revive a wounded comrade using CPR.
Both officers were taken to a hospital.
"The other officer is in serious condition and is undergoing surgery. We expect him to be fine," Bergner said.
Los Angeles County Sheriff Jim McDonnell said one officer was shot by the suspect and the other officer went to his aid and was shot in the face.
Other officers at the scene pulled them out of the line of fire, the sheriff said.
More information about the officers' condition was not available Saturday night.
There have been no other injuries or deaths since the two police officers were struck by the suspect's gunfire just after 9 Friday night, Deputy Trina Schrader of the sheriff's department told CNN.
So far this year, 17 law enforcement officers across the United States have died after they were shot, including an officer killed Tuesday in Missouri. Officer Christopher Ryan Morton, 30, was killed after being dispatched to the wrong house, a Missouri Highway Patrol official said.