Police tape
A Pennsylvania man allegedly snapped the neck of a female friend before beating her with a hatchet after the woman refused to marry him, Nov. 6, 2017. In this photo, yellow police tape and a police cruiser block off a street at the Hollywood Hills section of Los Angeles, March 31, 2015. Reuters/Kevork Djansezian

Police in California flooded a man's vehicle with water this week to save his life. But when the man exited the vehicle, those same police fatally shot him.

The bizarre incident began Sunday night when police in the Los Angeles suburb of Orange, California, pulled over a minivan driven by Michael Anthony Perez, 33, for a broken tail light and a warrant associated with the van's license plate number, police said in a statement. Perez pulled into a parking lot, but then refused to exit his vehicle and barricaded himself inside.

After roughly 30 minutes, police said Perez tried to light a gas container on fire. In dramatic video footage taken at the scene by OnScene.TV, Perez can be seen lighting a cigarette. Police said he placed the lit cigarette in a gas container.

Read: How Many Police Officers Have Been Indicted? Florida Police Officer Charged After Shooting Volunteer At Public Demonstration​

“The officers could smell the gasoline and became concerned when he lit a cigarette,” Orange police Lt. Fred Lopez told KTLA in Los Angeles. “We thought it could be combustible, so they felt that a plan needed to be put into place to save his life.”

Police called in the fire department. Together, fire fighters and police broke a window and flooded the vehicle with a fire hose to prevent Perez from setting himself, or the vehicle, on fire. In the video footage, Perez can be seen climbing out the driver's side window as water begins to flood the minivan.

After falling to the ground, footage showed Perez engaged in a brief struggle with one of the many officers at the scene, before he was fatally shot once in the torso. Police said Perez removed a knife from his pants, prompting the officers at the scene to use deadly force.

Perez had been living in the van for four months, his father-in-law Mike Medina told the Orange County Register. "He was pretty disturbed," Medina said Monday.

Police told the Register Perez had an extensive criminal history, which included arrests for narcotics and weapons.