NEW YORK — A federal grand jury has indicted two New York City college students on terror charges accusing them of attempting to provide material support to the Islamic State and carry out a terror attack.

Munther Omar Saleh, 20, and Fareed Mumuni, 21, have been in custody since June.

Prosecutors say the 21-year-old Saleh had researched recipes for homemade explosives and looked up city landmarks on the Internet. They also say he and the 20-year-old Mumuni discussed how to build a pressure cooker bomb.

On June 13, Saleh and another man were arrested in Queens after they approached a police officer while armed with knives.

Just a few days later, the FBI executed a search warrant on Mumuni's home on Staten Island. During the search, Mumuni allegedly tried to stab an FBI special agent with a large kitchen knife. Officials said the attack was premeditated.

“He kept the knife he used to attack the FBI Special Agent wrapped in a T-shirt in his bed for such an occasion,” the court document said. “Mumuni also stated that he kept the knife that was recovered from his mother’s vehicle for use in an encounter with law enforcement.”

Police Commissioner Bill Bratton commended the agents and detectives from the Manhattan-based Joint Terrorism Task Force and prosecutors on the case.

“Stabbing an FBI agent and providing ‎material support to a designated terrorist organization are a recipe for indictment, as alleged,” said Bratton.

Their defense attorneys haven't responded to messages seeking comment on the indictment. An attorney previously denied Mumuni is an Islamic State convert and said he has a clean record.

An arraignment is set for Aug. 20.