An appeals court ruled Friday that a Brooklyn Federal judge went easy on an ISIS-terrorist wannabe by giving him a “shockingly low” 17-year sentence, according to court papers.

Judge Margo K. Brodie sentenced Fareed Mumuni in February 2017 after the failed terrorist was convicted of trying to provide support for ISIS and for stabbing an FBI agent on Staten Island 2015.

Circuit Judge Jose A. Cabranes said Friday that the sentence meted out to Mumuni, 23, was 80% below the advisory guidelines of 85 years — and he sent the ruling back to the lower court for possible resentencing.

Prosecutors in June 2018 had asked that Mumuni receive 85 years. His lawyer argued that he should get much less time because he was a victim of ISIS recruiters.

Brodie called the idea of 85 years “excessive” at the sentencing and cited Mumuni’s age and lack of criminal record in her decision.

“This clearly erroneous assessment of the evidence leaves us with the definite and firm conviction that a mistake has been committed,” Cabranes wrote for the majority in the new ruling. “[It was] a mistake that resulted in a shockingly low sentence that, if upheld, would damage the administration of justice in our country.”