This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

As the search continues for the gunman who opened fire on a deputy in San Bernardino, police on Wednesday released new details about the incident, calling it an “ambush.”

The San Bernardino County sheriff’s deputy, a 27-year-old who has not been publicly identified, was wounded in a shooting around 4:15 p.m. Tuesday after trying to stop a vehicle and engaging in a short pursuit, authorities said.

It’s still unclear why the deputy was attempting the traffic stop in the area of 10th Street and Waterman Avenue.

When the driver didn’t yield, the deputy started chasing the vehicle, which turned onto Ninth Street then continued eastbound, making a southbound turn onto Bobbett Drive.

After making the turn, the suspect quickly got out of his vehicle, took out a rifle and “laid in wait for the deputy,” San Bernardino Police Department Sgt. Equino Thomas said during a media briefing.

As the deputy caught up and turned onto Bobbett, the gunman fired multiple rounds, according to police.

“This was an ambush situation,” Thomas said. “The suspect was able to exit his vehicle. He was able to retrieve a rifle, and actually assume position where he was actually able to fire at the deputy as he came around that corner.”

Surveillance footage taken near the scene of the shooting shows a patrol car with its siren blaring as it chases a white car. As the deputy’s vehicle rounds a corner in pursuit, what sounds like at least 20 gunshots ring out, and the patrol car comes to a halt.

Law enforcement then responded to aid the deputy, who was taken to a local hospital.

The deputy, a four-year veteran of the department, was still hospitalized in stable condition Wednesday and was expected to make a full recovery, according to the Sheriff’s Department.

San Bernardino Sheriff Shannon Dicus noted Tuesday that the deputy’s injuries appeared to be “superficial injuries to his face” and some shrapnel in his arm.

Following the incident, the white BMW believed to have been involved was located at an apartment complex on Date Street in San Bernardino.

Inside the car, police found a rifle with a caliber that matched the casings found at the scene of the shooting, according to Thomas.

A man believed to be the suspect in the shooting was fatally shot by San Bernardino SWAT officers surveilling him in Highland Wednesday afternoon.

The suspect, identified by police as 34-year-old Ervin Olikong, was described as a San Bernardino gang member with a violent criminal history.

Aerial video from Sky5 Tuesday showed a burned Sheriff’s Department vehicle at Bobbett Drive and East Olive Street. Officials said they were not sure how the car caught fire.

“If this person is willing to shoot at deputies or officers, I would consider them definitely dangerous — a danger to the public,” Thomas said.

Dicus said authorities are not ruling out any motivations behind the attack.

Thomas cited a recent incident in which an officer’s vehicle was struck by gunfire.

“This type of violence is becoming more prevalent,” the sergeant said. “Just last week, one of our officers, a San Bernardino police officer, was shot at by a suspect.”

However, the officer in that incident wasn’t struck or injured, according to Thomas.