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.

Rialto police fatally shot a 26-year-old man accused of stabbing an officer in the stomach in a seemingly random attack at a gas station Friday, authorities said.

David Viveros of San Bernardino approached one of the officers who was seated in a patrol car at a USA Gasoline station located at 280 E. Foothill Blvd., according to the Rialto Police Department. The officers had responded to the station at 6:21 a.m. after a person reported being shot by someone.

The agency released surveillance footage from the station that shows a man walk up to the patrol car before getting into a scuffle with an officer in the driver’s seat. Body camera footage released by police shows the man physically fighting with the officer and then reaching for a knife.

Viveros allegedly stabbed one of the officers while police used a taser on him twice. After the stabbing, another officer shot Viveros multiple times, police said.

Officers attempted lifesaving efforts but Viveros died from his wounds, police said.

Two officers were taken to a nearby hospital for treatment but the one who suffered a stab wound to the stomach remained hospitalized later Friday, police said.

Officials said it appears Viveros is not involved in the initial shooting investigation.

Anyone with information on either incident can reach Sgt. James Mills at 909-421-7225.