The injuries to the Sheriff deputies were announced by the LA County Sheriffs Twitter account. The attack took place at around 7pm (3am BST) in California when a gunman was spotted walking up to a car and shooting the two deputies.
Both victims, one male and one female, are being treated in hospital for their injuries.
On Twitter police commented: “Moments ago, 2 of our Sheriff Deputies were shot in Compton and were transported to a local hospital.
“They are both still fighting for their lives, so please keep them in your thoughts and prayers.”
They later added: “One male deputy and one female deputy were ambushed as they sat in their patrol vehicle.
The incident took place near Compton’s metro station.
Los Angeles County Sheriff’s Department released surveillance footage of the shooting on Twitter.
In the video an individual approaches the side of a police patrol car and fires multiple times into the window.
There did not appear to be any interaction between the police and shooter prior to the assault.
The suspect, who remains at large, was reportedly wearing black shorts and a black jacket.