A manhunt was underway following the incident, which began at a Chevron at the intersection of Ranchero Road and Escondido Avenue, according to investigators. The deputy confronted a robbery suspect at the gas station and tried to pepper-spray the man, who then brandished a gun and opened fire, the sheriff's department said.
The deputy was struck at least once, as was his marked SUV, authorities said. His vehicle was later seen with what appeared to be two gunshot holes in its windshield.
The deputy returned fire and pursued the suspect, who escaped and remained at large.
News video later showed the deputy rubbing the part of his torso where he apparently had been struck. He was transported to a hospital with injuries that were not life-threatening, authorities said.
The San Bernardino County Sheriff's Department released a surveillance photo of the man being sought. He is described as being in his 40s. The photo shows him wearing a collared shirt and dark sport coat inside the gas station's convenience store.
The suspect's vehicle is said to be a black Chrysler 200 sedan with paper license plates.