NEW YORK — A 17-year sentence for a New York City man who sought to aid the Islamic State group by trying to kill an FBI agent is “shockingly low," a federal appeals court said Friday as it ordered a judge to re-sentence him.

The 2nd U.S. Circuit Court of Appeals in Manhattan ordered a new outcome in Brooklyn federal court for Fareed Mumuni, saying sentencing guidelines that recommended an 85-year prison term for him reflect the judgment by Congress that “terrorism is different from other crimes.”

In a partial dissent, one of the three judges on the appeal panel said it would be fine if Mumuni received the same sentence again if the judge better explained the reasoning behind it.

Mumuni, a 25-year-old U.S.-born citizen, was sentenced in April 2018 after pleading guilty to charges that he planned to aid the extremist organization and tried to kill the agent who was searching his Staten Island home.

Mumuni attacked the agent with a knife, prosecutors said, but the agent's body armor protected him.

The 2nd Circuit panel, in a decision written by Judge Jose A. Cabranes, said judges have broad but not unlimited discretion at sentencing.

The appeals court said the judge “drastically discounted the seriousness of Mumuni's offense conduct based on a sterilized and revisionist interpretation of the record.”

It said the “clearly erroneous assessment of the evidence leaves us with the definite and firm conviction that a mistake has been committed — a mistake that resulted in a shockingly low sentence that, if upheld, would damage the administration of justice in our country.”

The appeals court said the sentencing judge appeared to second-guess whether Mumuni actually intended in June 2015 to kill FBI agent Kevin Coughlin with an 8-inch knife, even though he said he did.

“Mumuni’s violent attack against Agent Coughlin was indisputably a premeditated, willful, and deliberate attempt to murder a federal officer in the name of ISIS. In short, it was a pre‐authorized ISIS terrorist attack on American soil,” the appeals court said.

The 2nd Circuit noted that Mumuni held the knife behind his back as he descended stairs in his home and approached Coughlin before suddenly charging toward him and revealing the knife only when he was at arm's length.

In a separate opinion that agreed and disagreed with his fellow jurists, Circuit Judge Peter W. Hall wrote that he did not believe the sentence was “shockingly low.”

But he said he did not fully dissent because he believed a new sentencing hearing would give the judge a chance to clarify and explain in detail why it was appropriate to second-guess whether Mumuni intended to kill the agent.

He said he did not believe the judge is required to impose a different sentence.

“There is no doubt that this is a difficult case, but I fear the majority would prefer to substitute its sentencing preference for that of the District Court,” he wrote.