A 20-year-old New Jersey man sought to aid the Islamic militant group Hamas and threatened to "shoot everybody" at an unspecified pro-Israel demonstration, federal authorities said Wednesday.

Jonathan Xie was charged with attempting to provide material support to a designated terrorist organization, making false statements and transmitting a threat in interstate commerce. The material support carries a maximum prison sentence of 20 years.

At his initial court appearance Wednesday afternoon, he was ordered held without bail. His public defender didn't say whether he would file a motion for a bail hearing.

Xie entered the courtroom in shackles and wearing a green T-shirt and dark sweat pants. His only comments during the brief hearing were to say he understood the judge's instructions.

His parents attended the proceeding but declined to comment afterward.

Xie sent $100 to a person he believed was affiliated with a faction of Hamas last December, and a few days later, posted on his Instagram account that he was "pretty sure it was illegal but I don't give a damn," according to a criminal complaint.

The U.S. has designated Hamas a foreign terrorist organization since 1997.

Xie also allegedly lied on security forms he filled out when he sought to join the U.S. Army by not mentioning the donation.

The U.S. attorney's office also alleged Xie posted on Instagram that he wanted to bomb the Israeli embassy and Trump Tower in New York.

According to the criminal complaint, a person wearing a black ski mask later identified as Xie said in an Instagram video that he was against "Zionism" and the "neo-liberal establishment" and, in response to a question, said he would join Hamas "if I could find a way."

Later in the video, Xie allegedly displayed a handgun and said he was going to go to a pro-Israel march "and I'm going to shoot everybody."

According to the account of a person who interacted online with Xie and later contacted the FBI, Xie said the attack would be at an Al-Quds Day parade, an annual pro-Palestinian event held around the final Friday of Ramadan.

Assistant U.S. Attorney Joyce Malliet said in court Wednesday that authorities believe one of the events is to be held in New York's Times Square on May 31.

After an April trip to Trump Tower in which he was observed by FBI surveillance, according to the complaint, Xie posted photos of the building along with his intent to bomb it.

"Okay so I went to NYC today and passed by Trump Tower, then I started thinking about bombing it and I was imagining that the explosion would kill Trump and then I started laughing hysterically," he wrote according to the complaint. "I forgot to visit the Israeli embassy in NYC...i want to bomb this place along with trump tower."