The 27-year-old deputy, whose name has not been made public, remains hospitalized in stable condition, officials said Wednesday morning.
The incident began just after 4 p.m. Tuesday in the city of San Bernardino Tuesday near the area of Bobbett Drive and Olive Street, as the deputy was attempting to conduct a traffic stop, investigators said.
Surveillance video from a home in the area shows the deputy's vehicle chasing after a suspect in a residential neighborhood.
The suspect turns a corner and as the deputy follows, a barrage of more than 30 gunshots is heard. The video is now part of an investigation by law enforcement.
Investigators say after rounding the corner, the suspect exited his vehicle and waited for the deputy with a rifle, opening fire as the patrol vehicle made the turn.
"This was an ambush situation," said Sgt. Equino Thomas with the San Bernardino Police Deparment, which is investigating the incident.
"The suspect was able to exit his vehicle. He was able to retrieve a rifle and assume a position where he was able to fire at the deputy as he came around that corner."
The deputy then radioed a "shots fired" call and other deputies raced to the scene to assist him, placing him into a cruiser to drive him to a nearby hospital. He was later transported to the trauma center at Arrowhead Regional Medical Center in Colton.
Surveillance video shows deputy chasing suspect before shooting
Video also captured an unknown person, possibly a bystander, apparently running to take cover behind the patrol car as other deputies rushed to the scene.
At a news conference, Sheriff Shannon Dicus said that such an ambush can be "very traumatizing" for law enforcement personnel "and certainly not something you expect."
"We gotta remember, these folks that go out and do this job on our behalf as citizens, day in and day out, take those risks, and you never know when you're going to encounter somebody that's going to impose violence on you," Dicus said.
A white BMW possibly belonging to the suspect was later recovered. The suspect, believed to be a man in his 20s, remains at large.
San Bernardino police later confirmed they located the vehicle believed to be involved in the shooting, but only said it was found at an apartment complex on Date Street. News video shows nearly a dozen heavily armed SWAT deputies entering an apartment at that location late Tuesday night.
Thomas said a rifle was recovered from the vehicle that matched the casings at the scene of the shooting.
Police searched the apartment complex and placed several individuals under arrest, but they were not directly involved in the incident, Thomas said.
The deputy's SUV at the scene appeared to have been badly damaged by fire, with its front hood and windshield destroyed and charred black.
Cindy Bachman, a spokeswoman for the Sheriff's Department, said the deputy was still inside the SUV when the fire erupted.
UPDATE: Our deputy remains hospitalized, in stable condition. He is expected to make a full recovery.— San Bernardino County Sheriff (@sbcountysheriff) August 18, 2021
Sheriff Shannon Dicus said investigators have yet to determine how the vehicle fire started - whether it was a result of the gunfire or something else.
The deputy, a four-year veteran of the Sheriff's Department, was described as alert and conscious
Dicus said he visited the deputy later in the hospital. The deputy appeared to have superficial injuries to his face, with additional shrapnel injuries to his arm, the sheriff said. He was alert and coherent.
Later in the evening, Dicus tweeted: "We are glad to report that our deputy is currently in stable condition and in good spirits. Thank you for the outpouring of prayers and support for our deputy, his family, and our Department."