Fareed Mumuni, 21, appeared in Brooklyn Federal Court on Wednesday and is charged with attempting to murder a federal employee, according to the complaint.
The search was connected to an investigation stemming from the weekend arrest of Munther Omar Saleh, a 20-year-old U.S. citizen charged with conspiring to provide material support to ISIS.
Authorities believe Mumuni conspired with Saleh in planning a terrorist attack on behalf of ISIS. Law enforcement observed Mumuni meeting with Saleh on several occasions in May and phone conversations recorded by authorities describe one of Saleh's meetings with Mumuni as "motivating," according to court documents.
Early Wednesday morning, FBI agents arrived at Mumuni's home in Staten Island to execute a search warrant. Agents identified themselves to Mumuni and asked him to move to a couch in the living room, but according to the complaint, Mumuni "ignored the officer's commands and instead suddenly lunged at the officers with a large kitchen knife."
As officers attempted to restrain Mumuni, he allegedly attempted to repeatedly plunge the knife "into the torso of an FBI special agent and reached out with his hand in the vicinity of a rifle used by another member of law enforcement."
None of the knife stabs penetrated the agent's body armor and the agent only suffered minor injuries, the complaint said.
A pledge of allegiance to ISIS
After his arrest, Mumuni waived his Miranda rights and allegedly told investigators that he pledged allegiance to ISIS and intended to travel to territories controlled by ISIS.
Law enforcement officials also said Mumuni admitted discussing the construction of a pressure cooker bomb with Saleh and that his attack on the FBI agent was premeditated. Mumuni said he planned to attack law enforcement if his efforts to join ISIS were thwarted in any way, keeping a knife wrapped in a T-shirt in his bed as a precaution, the complaint alleges.
Mumuni's attorney, Anthony Ricco, said his client did not pledge allegiance to ISIS, despite law enforcement officials claiming he did.
"The charges related to ISIS carry very heavy weight, but this is just a complaint, nothing more. We'll have to wait and see how things play out in court," Ricco told CNN's Dominique Dodley.
Mumuni is still in police custody. His next court date has not yet been set.
If convicted, Mumuni faces a maximum sentence of 20 years in prison.
Over the weekend, federal agents arrested Saleh, a New York aeronautics student who allegedly was behind an ISIS-inspired plot with others to build and detonate a bomb.
According to an unsealed criminal complaint from the Eastern District of New York, Saleh, from Queens, was planning to detonate an explosive device in the New York metro area.
An FBI affidavit says agents were conducting surveillance of Saleh when he and another unidentified suspect tried to run toward the vehicle FBI agents were using to track him.
Saleh allegedly stated during an interview with investigators that he had pledged his allegiance to ISIS and was a "full-fledged" member of ISIS.
Additionally, electronic surveillance revealed that Saleh had emailed himself information about the construction of pressure cooker bombs and that he had also conducted Internet searches of notable New York City landmarks and tourist attractions, the complaint says. Authorities believe Saleh was searching for potential targets of his planned attack.
The Saleh case remains under investigation, and a law enforcement official has said more arrests are expected.