An ISIS wannabe was sentenced Thursday to 17 years in prison for attempting to aid ISIS and trying to kill an FBI agent.

Fareed Mumuni, 23, repeatedly stabbed special agent Kevin Coughlin when he and other officers were searching Mumuni’s Staten Island apartment in June 2015.

Coughlin, who was saved by the metal plates in his raid uniform, gave a statement in Brooklyn federal court on Thursday.

“When Mr. Mumuni came down the stairs that day, he came down the stairs with the intention to kill one of us,” Coughlin said.

“I’ve never met you. I’ve never wronged you, yet you tried to kill me,” he said, addressing Mumuni directly.

“This was not a battlefield, this was the city of New York and you tried to kill me,” Coughlin added.

Mumuni, who pleaded guilty, tried to apologize, saying, “I would like to apologize to the court and to the special agents who came to my house that day.”

Brooklyn federal Judge Margo Brodie hit him with one year less than his co-defendant, Munther Omar Saleh, who was sentenced in February for conspiring to aid ISIS, including recruiting Mumuni to the terror group.

“You made clear that if you couldn’t travel abroad, you would attack law enforcement, and that’s exactly what you did on the morning you were arrested,” Brodie said.

“There is no question that your conduct here is grave, reprehensible and that you attacked a law enforcement officer and could have killed him,” Brodie added.

Prosecutors had asked that Mumuni receive 85 years in prison, which defense lawyer Anthony Ricco opposed, painting his client as a victim of ISIS recruiters.

“He was not a leader. He was recruited … Fareed Mumuni is a young person who is capable of redemption,” the lawyer said.

In February 2017, Mumuni pleaded guilty to conspiracy to provide material support to ISIS, attempted conspiracy to provide material support to ISIS, assault, conspiracy to assault federal officers and attempted murder of federal officers.