By CBSLA Staff

RIALTO (CBSLA) — A Rialto police officer remains hospitalized Monday after a deadly shooting involving a man with a knife at a gas station.

Rialto police released footage of the officer-involved shooting that happened Friday at a gas station on East Foothill Boulevard. Police Chief Mark Kling said a man had attacked his officers while they were investigating an unrelated shooting.

READ MORE: Three Takeaways From Dodgers 2021 Season, NLCS

The surveillance video shows a man in black walking up to the open driver-side door of the patrol vehicle. The officer in the driver seat is then seen holding his hands out and pushing the man away.

READ MORE: 3 Shot In Downtown LA, 1 Dead

Two other officers on the scene intervened and used a stun gun on the knife-wielding man. One of the officers ultimately shot the man, killing him.

The man was identified as 26-year-old David Viveros of San Bernardino.

MORE NEWS: Man Accidentally Discharges Gun, Wounds Neighbor

According to Kling, three officers were hurt, and one of them is still in the hospital, recovering from a stab wound.