The 31-year-old female deputy and 24-year-old male deputy underwent surgery Saturday evening, Sheriff Alex Villanueva said in a late-night news conference. Both graduated from the academy 14 months ago, he said.
They were each in critical condition Sunday afternoon, said Deputy Trina Schrader.
The deputies were shot while sitting in their patrol car at a Metro rail station and were able to radio for help, the sheriff said. Villanueva, whose department has been criticized during recent protests over racial unrest, expressed frustration over anti-police sentiment as he urged people to pray for the deputies.
"It pisses me off. It dismays me at the same time," he said.
The department tweeted video of the shooting that shows a person open fire through the passenger-side window of the patrol car.
"The gunman walked up on the deputies and opened fire without warning or provocation," the department stated.
The video sparked reaction from President Trump who responded on Twitter, "Animals that must be hit hard!"
"This cold-blooded shooting is unconscionable and the perpetrator must be brought to justice," Democratic presidential candidate Joe Biden tweeted. "Violence of any kind is wrong; those who commit it should be caught and punished."
A handful of protesters gathered outside the the hospital where the injured deputies were being treated. The protesters tried to provoke deputies stationed outside and at one point were prevented from entering the emergency room, Bishop Juan Carlos Mendez with the Churches in Action group told the TV station KABC.
"Unacceptable behavior. The hospital should be a sanctuary, we should leave hospitals alone," he said. Mendez and members of his group gathered nearby in prayer for the wounded deputies.
"To the protesters blocking the entrance & exit of the HOSPITAL EMERGENCY ROOM yelling "We hope they die" referring to 2 LA Sheriff's ambushed today in #Compton: DO NOT BLOCK EMERGENCY ENTRIES & EXITS TO THE HOSPITAL," the sheriff's department tweeted. "People's lives are at stake when ambulances can't get through."
A radio reporter who was near the protest scene was taken into custody. The sheriff's department later tweeted that the reporter interfered with the arrest of a male protester.
"The female adult, who was later identified as a member of the press, did not identify herself as press and later admitted she did not have proper press credentials on her person," the department stated.
After being released, Josie Huang, a reporter for public radio station KPCC, a National Public Radio affiliate, said on Twitter that she had seen the statements from sheriff's officials and had "thoughts and videos to share soon after a little rest."
A video Huang said she shot moments before her arrest showed two men carrying red, black and green flags and shouting at deputies outside the hospital while a few other people stood by recording on their cellphones.
The executive editor of the station, Megan Garvey, expressed outrage over the arrest and said her reporter appeared to be wearing her credentials and had shouted her KPCC affiliation. NPR's Editorial Director Nancy Barnes said the network was "appalled" by the arrest of a reporter doing her job.
Meanwhile, the search for the gunman continued.
Capt. Kent Wegener said officers were blanketing the area in search of the suspect seen on the video opening fire with a pistol.
"We have a very, very generic description," he said.
The incident happened around 7 p.m. a short distance from the Compton sheriff's station south of downtown Los Angeles.
The U.S. Justice Department would assist sheriff's investigators with "all federal tools available," spokeswoman Kerri Kupec said on Twitter.
Protesters have railed against the LA Sheriff's Department for weeks over recent shootings by deputies, including the killing of a man on a bicycle last month.
"Of course, there's an important conversation going on about policing in this country, but these are folks who put their lives on the line for us, and we will find justice for them," Los Angeles Mayor Eric Garcetti said on CNN Sunday.