Napa County Deputy Riley Jarecki shot and killed a suspect on Feb. 17. Footage taken from her body cam shows that he pulled a gun on her — and fired the first shot.

In addition, details that emerged after the shooting revealed that Javier Hernandez Morales was in the country illegally, had already been deported three times and was subject to several ICE detainers that had been ignored by local law enforcement.

WATCH:

As seen in the video, Jarecki approached the vehicle on the passenger side and spoke with Hernandez Morales briefly, then asked if she could look inside the car. She shined her flashlight into the car and instructed Hernandez Morales, who was in the driver’s seat at the time, to stay where he was.

Jarecki then went around to the driver’s side and directed Hernandez Morales to roll down the window. He complied, but about 10 seconds later he pulled a .22-caliber revolver and fired it at least once. (RELATED: Police Officer Killed During Traffic Stop By Illegal Immigrant)

“Shots fired, shots fired!” Jarecki could be heard yelling on the video. She ran back around to her own vehicle for cover and fired back as Hernandez Morales revved the engine, emptying 15 rounds into his passenger door.

Hernandez Morales was pronounced dead at the scene — but after running down his identification, authorities learned that the shooting could have been prevented. Hernandez Morales, who had several known aliases, had been arrested several times by Jarecki’s own department. He had already been deported three times and there was an arrest warrant out on him at the time of the shooting.

Immigration officials confirmed that there should have been an ICE detainer on Hernandez Morales as a result of several prior arrests — for suspected DUI and battery of a peace officer among other offenses.

Local law enforcement defied several such detainers — issued to Napa County Jail in 2014, 2015 and 2016 and to Sonoma County Jail in 2016 — because of California’s status as a sanctuary state.

Follow Virginia on Twitter