A Southern California deputy was shot in an ambush attack earlier this week, following which the suspect was killed in another shooting that left two cops injured.

On Wednesday afternoon, gunfire started soon after officers with the San Bernardino Police SWAT unit tried to arrest the suspect in connection with the deputy shooting, said San Bernardino police Lt. Michele Mahan, according to Fox News.

Mahan informed that two cops were shot, and both were able to speak at the time they were taken to a hospital. The suspect, on the other hand, was declared dead at the scene.

The shooting, which happened in the city of Highland, took place a day after a San Bernardino County Sheriff's deputy was shot while trying to stop a motorist. Bullets were fired at the deputy when he turned a corner during a car chase. He ended up with superficial facial injuries, and a possible gunshot or shrapnel wound to his arm for which he is getting treated at a hospital. He is said to be in stable condition despite the injuries.

"He (the suspect) was able to immediately get out of his vehicle and as the deputy tried to catch up… he was able to retrieve a rifle from the vehicle," said San Bernardino police Sergeant Equino Thomas. He added that as the deputy turned, the suspect fired multiple rounds, and based on the actions of that person, he "ambushed that deputy."

The officer's car was found burning at the scene, and now detectives are trying to find out how it caught fire. On Tuesday night, cops searched an apartment complex where they found the rifle used in the attack and the suspect's vehicle.

The suspect was identified as 34-year-old Ervin Olikong, who is a San Bernardino gang member, and was accused of robbery and assault in the past, Associated Press reported. After he was identified as the suspect in the attack that happened on Tuesday, cops put him under surveillance for many hours. Later they moved in to arrest him, at which point he started shooting at the officers, who then fired back, San Bernardino Police Chief Eric McBride said.

Police patrol vehicle.
Representational image. Pixabay.