NEW YORK — A Bangladeshi immigrant who set off a pipe bomb attached to his chest in New York City's busiest subway station should face no more than the 35-year mandatory prison sentence for his crime because his attack was an aberration from an otherwise peaceful life, his lawyer said Thursday.

Attorney Amy Gallicchio told a judge that any more time in prison for Akayed Ullah would be excessive, particularly because her client "lived lawfully and peacefully" before the December 2017 attack in subway tunnels beneath Times Square and the Port Authority bus terminal.

The assistant federal defender filed her written arguments in advance of Ullah's scheduled April 8 sentencing in Manhattan federal court.

Ullah was arrested in the December 2017 attack when his bomb barely exploded, leaving him with serious burns but causing mostly minor injuries to those near him.

Prosecutors will file their pre-sentencing arguments next week. They could request up to life in prison for the 31-year-old man who was convicted in November 2018.

Earlier this year, Judge Richard J. Sullivan rejected a request to throw out the conviction, saying evidence amply establishes" that Ullah acted at the Islamic State group's direction by "heeding the call of the organization's propaganda and recruiting materials.

At trial, prosecutors showed jurors Ullah's post-arrest statements and social media comments, including when he taunted then-President Donald Trump on Facebook before the attack.

Hours after Ullah's bombing attempt, Trump derided the immigration system that had allowed Ullah — and multitudes of law-abiding Bangladeshis — to enter the U.S.

Ullah got an entry visa in 2011 because he had an uncle who was already a U.S. citizen. Trump said allowing foreigners to follow relatives to the U.S. was "incompatible with national security."

In arguing for leniency, Gallicchio wrote that Ullah's crime didn't stem from a long standing commitment to violent extremism or jihadist movements, but instead resulted from "a personal crisis that left him isolated, depressed, vulnerable and suicidal."

She noted that there was no evidence that Ullah communicated with or was directed by any terrorist group.

"The reasons for Mr. Ullah's conduct were and remain aberrational and there is no chance such conduct will be repeated," she said. "Mr. Ullah's actions were without a doubt dangerous, intolerable and deserving of punishment, but they were also an attempt to take his own life, which evinces a man in extreme crisis."

Sullivan, who now sits on the Manhattan federal appeals court, presided over Ullah's trial when he was a district court judge and will sentence him.