The man accused of setting off fireworks and lighting a blaze outside New York City’s largest immigration court was charged with federal arson Tuesday, prosecutors announced.

Law enforcement officials said Andrew Arrabaca, a 43-year-old Army veteran, targeted 26 Federal Plaza and was willing to hurt or kill people when he launched a bundle of fireworks, fired pellets from an Airsoft rifle and ignited a flammable liquid there early Monday. They said he yelled derogatory statements about U.S. Immigration and Customs Enforcement after his arrest and brought a sign that said “ICE off our streets.”

The Lower Manhattan federal building is where many immigrants attend court hearings and naturalization ceremonies. It has also become a flashpoint over immigration enforcement under President Donald Trump’s administration, as federal agents have arrested immigrants in the hallways and held them in cramped conditions.

“This attack could have ended much more tragically,” Assistant U.S. Attorney Samantha Fry said in court Tuesday evening.

The prosecutor said Arrabaca had been planning for months and started purchasing supplies at least as early as January, including from upstate New York and Pennsylvania. She also said Arrabaca had visited the building before and chose an entrance that he knew would be busy.

Arrabaca provided a “fulsome confession” to law enforcement after his arrest, “detailing what he did and why,” Fry said. She said he was “well aware of the risk to the public” and was willing to accept that risk — as well as the risk of his own death.

The assistant U.S. attorney asked Magistrate Judge Robyn F. Tarnofsky to hold Arrabaca in jail while he awaits trial because she said he poses a danger to the public and a risk of flight. She said he is unemployed and living out of his car. If convicted, he faces a mandatory minimum sentence of seven years in prison.

“There is a lot of incentive for him to not appear,” Fry told the judge.

Federal defender Jennifer Brown agreed that “the weight of the evidence does appear to be strong” against her client but asked the judge not to hold him in jail. She said Arrabaca is a United States citizen and lifelong New Yorker with no criminal history who, until recently, was regularly employed.

Brown asked the judge to release him to a locked ward at a Veterans Affairs emergency psychiatric hospital, where he could be evaluated. She said words on the helmet he was wearing at the scene suggested suicidality and that there seemed to be “an underlying mental health issue going on here.”

“It’s certainly clear that he’s not getting any appropriate psychiatric care at [the Metropolitan Detention Center],” she said.

As a veteran, she said, he had better access to mental health services than most New Yorkers and a staff member could escort him to the hospital.

But Fry said Arrabaca had been diagnosed with a mental illness in 2020 and prescribed medication but stopped taking it in 2021. The judge expressed concerns about what would happen after his evaluation if he decided not to comply with treatment. She also said Arrabaca had access to medical services before the attack and chose not to use them.

“It’s an intractable problem,” Tarnofsky said. “If somebody makes choices not to take advantage of medical care, mental health care that’s available to them, I don’t know if it mitigates the risk.”

After leaving the courtroom for several minutes, the judge said she would send Arrabaca to jail rather than to the hospital, given the nature and circumstances of the alleged crime.

“I seriously considered the alternatives proposed by Ms. Brown, but I had to reject them because I can’t — I don’t think it is sufficiently clear that you would necessarily comply with treatment,” Tarnofsky said.

She told prosecutors to do “whatever is possible” to get a mental health evaluation for Arrabaca at MDC and explore options for him to be detained at another facility where he could receive more extensive treatment.

“This is someone who … served our country and who is, I think, quite clearly ill,” the judge said.

James Barnacle, the assistant director in charge of the FBI’s New York field office, said Monday that two government employees and one immigrant on the way to a hearing suffered minor injuries. He also said Arrabaca brought various weapons with him to the building, including axes, a hammer, a machete and several knives. A Department of Homeland Security spokesperson said officers found a “manifesto” in his bag.