The incident began about 7 p.m. Thursday in the area near the South Park Recreation Center around 49th and San Pedro streets.
Officers "were standing in front of a residence in that block, speaking with a citizen, when shots rang out from inside that residence directed toward officers," said LAPD Sgt. Barry Montgomery. "The officers returned fire and took positions of cover."
Additional resources, including SWAT officers, were called in and the neighborhood was locked down as officers searched the neighborhood for hours.
Shots were fired again several hours later. Police said when officers located the suspect, he shot at an officer's head, striking his helmet. He was not injured.
The suspect was taken into custody shortly before 1 a.m. Friday.
#LAPD OIS Update: Susp in custody. Thorough investigation being conducted. Updates as info becomes available. Thanks for ur patience— LAPD HQ (@LAPDHQ) June 16, 2017
No other injuries were reported.
San Pedro near 49th Street remained closed Friday morning as authorities continued their investigation.