A New Jersey man allegedly sought to help the terror group Hamas and threatened to bomb Trump Tower in New York City as well as "shoot everybody" at a pro-Israel demonstration, federal investigators alleged.

Jonathan Xie made his initial court appearance on Wednesday in Newark, N.J. The 20-year-old was charged with attempting to provide material support to a designated terrorist organization, making false statements and transmitting a threat in interstate commerce.

Xie allegedly sent $100 to a person he thought was associated 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.

AMERICAN TALIBAN FIGHTER JOHN WALKER LINDH TO BE RELEASED FROM US FEDERAL PRISON

He also allegedly did not mention the donation on security forms he filled out when he tried to join the U.S. Army.

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

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

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

HUNTING AYMAN AL ZAWAHIRI: WHERE HAS THE AL QAEDA LEADER BEEN HIDING FOR 18 YEARS?

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

"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," the complaint stated Xie allegedly wrote. "I forgot to visit the Israeli embassy in NYC... I want to bomb this place along with Trump Tower."

Xie, who entered the courtroom in shackles, did not say anything during Wednesday’s brief hearing, aside from saying he understood the judge's instructions.

He was ordered held without bail because the judge ruled Xie was a threat to the community. His public defender didn't say whether he would file a motion for a bail hearing.

His parents attended the proceeding but declined to speak with reporters.

CLICK HERE TO GET THE FOX NEWS APP

Xie faces a maximum of 20 years in prison and a $250,000 fine on the terrorism charges.

Fox News' Ben Evansky in Newark and The Associated Press contributed to this report.