NORFOLK, Va. (WVEC) -- A judge ruled the Suffolk man accused of supporting the Islamic State will remain behind bars. Lionel Nelson Williams, 26, is facing one charge of attempting to provide material support to a designated foreign terrorist organization.

During a bond hearing Wednesday, prosecutors claim Williams told investigators they were lucky they arrested him outside his home, because he would have had a shootout with the agents. Prosecutors also revealed Williams confessed to supporting ISIS and told investigators he wanted to be a martyr and plan an attack locally in Hampton Roads.

Williams, also known as Harun Ash-Shababi, 26, was arrested on December 21 in Suffolk.

Williams’ defense attorney argued his client was entrapped by the FBI, and that Williams wasn’t doing anything illegal before the FBI became involved. His defense attorney argued Williams legally owned firearms and was allowed to express his support for ISIS under the First Amendment of the Constitution, which guarantees freedom of speech.

The judge denied bond Wednesday, saying if Williams were to be released, there would be potential harm to the community. Several family members and friends of Williams were in the courtroom for the hearing. None of them wanted to comment after court.

According to court documents, FBI agents were contacted by a former associate of Williams in March to report that he was sharing ISIL videos and other ISIL supportive posts on his Facebook page.

Williams allegedly posted "The Jihad (the struggle) doesn't end just because it stops feeling good", along with a video lecture by a now deceased Al-Qaeda member.

According to the affidavit in support of the criminal complaint, in October and November 2016, Williams sent money to a person he believed was collecting money for ISIL to purchase weapons and ammunition for ISIL fighters.

The investigation also revealed that Williams allegedly ordered an AK-47 assault rifle the day after the terror attack in San Bernardino, California, in December 2015. Investigators say and two firearms, including an AK-47 and a semi-automatic handgun, were recovered in a post-arrest search of Williams’ residence.

Court documents state that on June 13th, Williams told an undercover FBI agent that he supports attacks on "hard targets." Hard targets are identified as police officers, military members, and other targets that have the ability to defend themselves.

Williams allegedly stated that the only reason he had not carried out an attack is because his grandmother is still alive, and he needs to care for her.

Williams faces a maximum penalty of 20 years in prison if convicted.

This case was investigated by the Norfolk Joint Terrorism Task Force and the Suffolk Police Department. Williams is expected to be back in court Wednesday.