The shooting happened around 7 p.m. Monday near the intersection of Pickering Avenue and Penn Street, according to the Los Angeles County Sheriff's Department.
Whittier police officers were doing surveillance on a man suspected of being the shooter in a murder that occurred on Sunday in Santa Fe Springs.
The officers attempted a traffic stop, but the suspect, identified as Edgar Gonzalez, got out of his car and ran away. Police followed the 25-year-old on foot and ended up between two apartment complexes where the shooting happened.
Gonzalez continued running before police say he discarded a semi-automatic handgun.
Police officer in 'good spirits' after being shot in Whittier; suspect in custody
Officers used a baton and deployed a K9 before he eventually surrendered and was taken into custody. Gonzalez sustained a gunshot wound to one hand, while the officer sustained two gunshot wounds to his lower extremities.
Both of them were taken to the hospital in stable condition.
According to a Facebook post published by Whittier Mayor Joe Vinatieri, the officer, who has not been identified, was in "good spirits."
Meanwhile, neighbors said they were startled by the sound of gunfire.
"My husband and I were sitting in the living room and next thing you know, we heard pops, and my husband's like, 'Was that gunshots or fireworks? I think it was fireworks,'" said Alexis Martinez, who lives in the area. "He was like, 'Nope!' Once we saw the cops and the lights, we were like, 'It was gunshots.'"
Other neighbors said they heard at least 10 gunshots.