A FBI agent was stabbed at by a Staten Island man while conducting an ISIS-related home search.

A Staten Island man – who authorities say was planning a terror attack in New York – stabbed an FBI agent with a knife as investigators searched his home early Wednesday morning.

Fareed Mumuni, 21, was arrested for allegedly planning a terrorist attack in the New York area on behalf of ISIS, authorities report.

While the FBI-NYPD Joint Terrorism Task Force searched Mumuni’s home he came at an officer with a large kitchen knife. The agent suffered minor injuries.

Mumuni supposedly admitted to planning the attack, keeping one knife wrapped in a T-shirt in his bed and another in his mother’s vehicle, according to court documents.

He “espouses violent jihadist beliefs” said a FBI report.

After his arrest, Mumuni reportedly told investigators that he “pledged allegiance” to ISIS and intended to join the group in ISIS-controlled territories. He went on to state that if his attempts to join ISIS were thwarted he would attack law enforcement officials.

Munther Omar Saleh, Mumuni’s accused co-conspirator, and others were arrested Saturday for “attempting to provide material support and resources” to ISIS, the complaint says.

Saleh searched for notable New York City tourist attractions and emailed himself information on how to build a pressure cooker bomb, such as the one used in the 2013 Boston Marathon bombings. He was also arrested while reportedly attacking an officer with a knife, authorities said.

Mumuni was held without bail. If convicted he can face 20 years in prison for attempting to murder a federal officer.