A man who struggled with federal immigration officers last week in Mt. Washington before being whisked away in a white van is a Nicaraguan national targeted after he tried to buy a gun, according to papers filed Tuesday in federal court.

Darwin Alexander Davila-Perez, whose age is not listed in court records, was charged with assaulting a U.S. Immigration and Customs officer in the Dec. 17 encounter, which was captured on video.

Authorities said Davila-Perez claimed to be a U.S. citizen when trying to buy a gun from a licensed dealer in Western Pennsylvania, according to an affidavit by Matthew Kreush, a special agent with Homeland Security Investigations in Pittsburgh.

Davila-Perez had “no legal status to be present” in the U.S., the affidavit said, and his attempt to buy a gun was denied.

ICE employees, identified as “deportation officers,” watched Davila-Perez leave his home on Norton Street and attempted to stop him after he started to drive away in a white Toyota Tacoma, the affidavit said.

Authorities say the suspect hit and bit a federal agent during the struggle that followed.

Neighbors told TribLive they woke around 8 a.m. to the sounds of screaming as federal agents hit, tackled and pepper-sprayed the man later identified as Davila-Perez.

“This is a new level of violence than we’ve seen in the city,” Jaime Martinez, executive director of Frontline DIGNITY, a nonprofit that advocates for immigrants, said at the time.

Those who watched the incident unfold said two unmarked vehicles sandwiched the white pickup on the 400 block of Norton Street. Agents then broke the truck’s driver’s side window, pulled a man from the car and got into a physical altercation with him.

Neighbors who saw the incident — including some who recorded it — said the agents punched the man and shoved him to the ground.

The affidavit filed Tuesday described how the ICE officers boxed in Davila-Perez.

Then, the affidavit said, when an officer — identified only as “Officer P.B.” — walked toward the vehicle, Davila-Perez reversed it. He struck an ICE vehicle — with “Officer D.V.” still inside — and then tried to run away, according to the affidavit.

Officer P.B. caught up to Davila-Perez on the front porch of a nearby home. When he tried to handcuff Davila-Perez, the suspect elbowed him in the face and reached for his holster, according to the affidavit. Davila-Perez also bit the officer’s right forearm.

Authorities said the other ICE officer responded by pepper-spraying Davila-Perez. After one of the suspect’s arms was handcuffed, he swung the handcuffs and struck one of the ICE officers in the head, according to the affidavit.

One witness to the incident said the pepper spray also struck at least one immigration agent. A neighbor called Pittsburgh police, who were not initially on the scene when ICE detained the man.

Video obtained by TribLive shows several city police officers and at least one paramedic on the scene.

The affidavit said the officer who was bitten needed medical attention.

Cara Cruz, a Pittsburgh public safety spokeswoman, confirmed last week that police responded to Norton Street around 8:25 a.m. “following multiple calls for an individual fighting with unknown law enforcement officers in the street.”

Medics arrived to evaluate “all parties,” including ICE agents and the man who was the “target of their operation,” Cruz said in a statement.

“Of note, Pittsburgh police is not apprised of ICE activity, such as federal administrative warrant service, in the City of Pittsburgh and does not assist ICE agents with such operations,” Cruz said. “Pittsburgh police officers respond to emergency calls for service in their jurisdiction.”

“My administration will not work with ICE,” Mayor Ed Gainey said during a PA Press Club event in Harrisburg in January. “We will do whatever’s necessary to make our city more welcoming. That’s what we’re built on.”

Davila-Perez was taken away in one of the ICE agent’s vehicles. His attorney was not listed Tuesday in court records.

Davila-Perez was charged with “forcibly assaulting, resisting, opposing, impeding or interfering with — involving physical contact — certain officers or employees who were engaged in or on account of the performance of official duties.”

Jason Koontz, a spokesperson for ICE based in Philadelphia, has told TribLive he was aware of the incident but could not immediately provide comment.

Koontz did not respond to an email Tuesday seeking comment.