A suspect killed by a Napa County, California police officer after attempting to shoot and kill the officer was an illegal alien living in the United States who had previously been deported three times.

On February 17, illegal alien Javier Hernandez-Morales opened fire on Napa County Deputy Riley Jarecki after she asked the man to roll down his window, as body cam footage reveals. Upon opening fire on the officer, the illegal alien was shot and killed by Jarecki.

The Immigration and Customs Enforcement (ICE) agency confirmed to local media on Thursday that Hernandez-Morales was, in fact, an illegal alien who has been previously deported three times — twice in 2007 and once in 2010.

According to ICE officials, Hernandez-Morales is a native of Mexico and had been deported three times before 2011 by federal immigration agents.

Since 2011, the sanctuary state of California — which shields all noncriminal and criminal illegal aliens from deportation — protected Hernandez-Morales from being deported on four separate occasions, in 2014, 2015, and 2016, ICE officials said.

“After 2011, ICE issued detainers four separate times for Hernandez-Morales following his arrests for local crimes including driving under the influence, battery on a peace officer, selling liquor to a minor and probation violations. None of the four detainers lodged were honored by local jails,” ICE officials 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,” the ICE statement continued.

ICE officials said the officer-involved shooting “may have been prevented” entirely if California allowed for federal immigration agents to be notified of the illegal alien’s arrests and convictions.

“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,” the ICE statement said.

The shooting comes nearly two months after 33-year-old Newman, California, police officer Ronil Singh was gunned down during a traffic stop and allegedly killed by 32-year-old illegal alien Gustavo Perez Arriaga.

Last year, alone, the Immigration and Customs Enforcement (ICE) agency arrested nearly 2,000 convicted and suspected illegal alien killers, leaving behind countless American and legal immigrant victims.

John Binder is a reporter for Breitbart News. Follow him on Twitter at @JxhnBinder.