A federal agent was injured when an accused illegal immigrant allegedly tried to evade arrest and “weaponized” his vehicle, prompting the officers to open fire in California Wednesday, the Trump administration said.

US Department of Homeland Security agents were trying to arrest “a violent criminal illegal alien” from El Salvador in Compton, when he “weaponized his vehicle and rammed law enforcement,” the agency said in a statement on X.

“Fearing for his life and safety, an agent fired defensive shots,” the statement said.

Agents were conducting an operation to apprehend an immigrant who a federal judge issued a final order of removal in 2019, officials said. AFP via Getty Images

The alleged migrant, William Eduardo Moran Carballo, was not hit. He then attempted to run away — but was caught by law enforcement, DHS said.

A Customs and Border Protection officer was injured, DHS said.

The Los Angeles Sheriff’s Department said the gunshots rang out during a car chase, that ended in a crash on the 2400 block of 126th Street near Willowbrook after an immigration enforcement action.

Federal agents were “conducting a targeted operation” to arrest Carballo. AFP via Getty Images

A resident confronts a federal agent as they investigate the scene. AFP via Getty Images

“It was [not immediately known] if the individual’s vehicle crashed into other vehicles, was struck by a Border Patrol vehicle or crashed into something,” the spokesperson told KTLA. “Sheriff’s deputies are not involved in the shooting [but they] are on scene maintaining a perimeter to keep the public away from the scene.”

Federal agents were “conducting a targeted operation” to arrest Carballo, who they alleged was involved in a human smuggling operation and has two prior arrests for inflicting corporal injury on a spouse or cohabitant.

Both border patrol and ICE agents were involved in the incident Wednesday morning. CBS

An immigration judge had issued him a final order of removal in 2019, DHS said in its statement.

“These dangerous attempts to evade arrest have surged since sanctuary politicians, including Governor Newsom, have encouraged illegal aliens to evade arrest and provided guides advising illegal aliens how to recognize ICE, block entry, and defy arrest,” DHS said, claiming, “Our officers are now facing a 3,200% increase in vehicle attacks.”