Two San Bernardino, CA, police officers were shot in the nearby town of Highland Wednesday afternoon while investigating a man believed to have wounded a San Bernardino County deputy during an “ambush” shooting the day before. The suspect was killed.

The SWAT officers had been surveilling the man for hours in connection with the investigation into the deputy’s shooting when they attempted to take him into custody about 3:30 p.m., officials said.

The suspect reportedly opened fire and the officers shot back, KTLA reports. 

The man, identified by police as 34-year-old Ervin Olikong, was killed in the shootout, San Bernardino police Chief Eric McBride said during a news conference Wednesday evening.

The officers were taken to Loma Linda University Medical Center and are expected to survive, with one of them released Thursday. One of the officers was in surgery Wednesday evening, McBride said. They have not been identified.

On Tuesday, a 27-year-old deputy was wounded in a shooting about 4:15 p.m.

He was trying to stop a vehicle reportedly operated by Olikung.

After making a turn, the gunman got out of his vehicle, took out a rifle and “laid in wait” for the deputy, officials said Wednesday, calling the incident “an ambush situation.”

San Bernardino County Sheriff Shannon Dicus Wednesday evening that the four-year veteran of the department is still being treated for facial injuries and a possible gunshot wound to his arm, but he is doing “very well,” and is expected to be released from the hospital this week.