NAPA (CBS SF) — The man who was shot dead by a Napa County sheriff’s deputy after he fired at her point blank during a traffic stop was a Mexican national in the country illegally after being deported multiple times, according to U.S. Immigration and Customs Enforcement.

Javier Hernandez-Morales shot at and missed Deputy Riley Jarecki during a traffic stop late Sunday night as she stood next to his driver-side window. Jarecki returned fire multiple times, killing Hernandez-Morales.

READ MORE: Report: San Francisco Giants Lose Free Agent Pitching Ace Kevin Gausman To Blue Jays


*This post contains graphic video content and is not suitable for children.*

ICE told KPIX 5 that Hernandez-Morales had been deported three times prior to 2011. After 2011, Hernandez-Morales was arrested a number of times for crimes including driving under the influence, battery on a peace officer, and probation violations.

Immigration officials said they issued detainers four separate times for Hernandez-Morales following his arrests but none were honored by local jails.

“ICE is grateful the deputy involved in this shooting was not harmed during this attack,” the agency said in a statement. “It’s unfortunate that our law enforcement partners and the community are subjected to dangerous consequences because of inflexible state laws that protect criminal aliens.”

“This incident may have been prevented if ICE had been notified about any of the multiple times Hernandez-Morales was released from local custody over the last few years. This is an impactful, scary example of how public safety is affected by laws or policies limiting local law enforcement agencies’ ability to cooperate with ICE.”

READ MORE: 'The Long Good-Bye'; New Hope In The Battle Against Alzheimer’s Disease

ICE said it issued three detainers for Hernandez-Morales to Napa County Jail in 2014, 2015 and 2016; and a detainer to Sonoma County Jail in 2016, none of which were honored.

Late Thursday afternoon, Napa County officials said they were complying with a change in state law in 2017.

“We are in compliance with state law. That is the law of the state of California, and the county intends to comply with state law,” said Napa County Supervisor Vallea Ramos.

“We have to continue to learn from these unfortunate incidents,” said Napa County Sheriff John Robertson. “Once we get all the facts, I think it’s going lead us to really understand the facts more, then make a decision if state law does need to be changed.”

After Sunday night’s shooting, the Napa County Sheriff’s Office released Deputy Jarecki’s bodycam video of the incident, which showed Hernandez-Morales quickly producing a handgun and firing at her head.

Undersheriff Crawford said it was “divine intervention” that kept Jarecki from getting shot.

MORE NEWS: Returning Thanksgiving Travelers Encounter Few Delays At Local Airports

“It’s pretty obvious that he [Hernandez Morales] intended to kill her,” said Crawford. “We are proud of the deputy’s composure and her fight to save her life.”