Two New England men pleaded not guilty in federal court in Boston on Friday to charges they plotted to beheadMassachusetts police officers to aid the militant group Islamic State.

Wearing orange prison fatigues, David Wright, 25, of Everett, and Nicholas Rovinski, 24, of Warwick, R.I., entered their not guilty pleas at the arraignment in U.S. District Court in Boston.

They were ordered held until their next hearing on July 29.

Wright was arrested in Boston on June 2, the same day that officers shot dead a third man, Usaamah Abdullah Rahim, while trying to question him about the beheading plot.

Authorities said Rahim, 26, threatened the officers with a knife. Rahim's family issued a statement on Friday saying they were "shocked" by officials' handling of the case and calling for an investigation into Rahim's death.

Prosecutors said Rahim, Wright and Rovinski in late May "conspired to commit attacks and kill persons inside the United States, which they believed would support ISIL’s objectives," using an acronym for the militant group that controls parts of Iraq and Syria and has vowed attacks on America.

The offense carries a maximum prison sentence of 15 years. Wright also faces several obstruction of justice charges, one of which is punishable by up to 20 years in prison.

The prosecutors said the men initially wanted to behead New York resident Pamela Geller, who had organized a Texas event in May highlighting cartoons of the Prophet Mohammad, images that many Muslims consider blasphemous. Two gunmen had attacked that event, and were shot dead by police.

They said Rahim later called Wright, who is also known as Dawud Sharif Abdul Khaliq, to say he had revised his plan and instead intended to attack "those boys in blue," by which he meant Massachusetts police officers. Rovinski, who was arrested last week, is also known as Amriki aka Nuh al Andalusi.

The case follows a handful of so-called "lone wolf" attacks in the United States and Canada since last year by people who authorities said were inspired by Islamic State.

Rahim's family said it "remains shocked by these allegations" and that it believed police were trying to illegally arrest Rahim when he was killed.

"The family maintains that, even if Usaamah Rahim was complicit in the crimes outlined in the indictment, the shooting that caused his death must be thoroughly and fairly investigated," it said.