The shooting occurred about 9:50 p.m. on Hartford Avenue, south of Seventh Street.
"She was ambushed," Officer Mike Lopez said. "You're walking and all the sudden someone starts shooting at you."
The unidentified officer was hit in the thigh and was hospitalized at County-USC Medical Center.
On his way to the hospital, LAPD Chief
The officer who was shot recently graduated from the LAPD academy and was with her training officer at the time, Beck said. The chief said the officer was in stable condition late Friday.
The training officer was not wounded. Neither fired a weapon, Lopez said.
The LAPD tweeted, "Please keep the officer in your prayers tonight."
A 28-year-old suspect was taken into custody, and the gun recovered by a Metro officer responding to the scene, Beck said. Several streets in the area were closed, as well as the southbound 110 Freeway, as officers conducted their search.
An officer at the Rampart station, which is near the scene, said, "The situation is still fluid."
This story will be updated as more information becomes available.
Times staff writer Kate Mather contributed to this report.
12:45 a.m.: This article was updated with comments from LAPD Chief Charlie Beck.
11:40 p.m.: This article was updated with additional information about the shooting.