A 20-year-old New Jersey man accused of supporting a terror group and threatening to blow up Trump Tower and the Israeli Consulate in New York City was arrested Wednesday, federal prosecutors said.

Jonathan Xie, of Basking Ridge, about 40 miles outside of Manhattan, is charged with two counts of attempting to provide material support to a designated terrorist organization, two counts of making false statements and one count of transmitting a threat, according to a statement from the U.S. Attorney's Office in New Jersey.

A screenshot of an Instagram post by Jonathan Xie. U.S. Attorney's Office

Late last month, shortly after FBI surveillance observed Xie outside of Trump Tower in New York City, Xie posted two photos of the building to his Instagram account, the statement said. One had the words “I want to bomb Trump Tower" emblazoned over the photo, and the other was accompanied by “[S]hould I bomb Trump Tower,” a “Yes/No” poll, along with an emoji of a bomb.

Xie later posted on Instagram: “Okay, so I went to NYC today and passed by Trump Tower and then I started thinking about bombing it and I was imagining the explosion would kill Trump and I started laughing hysterically."

"S*** I forgot to visit the Israeli embassy in NYC ... i want to bomb this place along with trump tower,” Xie added, according to a criminal complaint.

Authorities said Xie had not developed any specific attack plot, but the FBI had been monitoring him long before his visit to New York.

A statement from the Consulate General of Israel said the consulate does not comment on security issues, but works closely with law enforcement and "has total confidence in them."

In December of last year, Xie sent $100 to someone in Gaza whom he believed to be part of a Hamas faction "that has conducted attacks, to include suicide bombings against civilian targets inside Israel," according to the U.S. attorney's office.

“Just donated $100 to Hamas. Pretty sure it was illegal but I don’t give a damn," he later posted on Instagram.

An FBI employee who was working undercover said Xie sent a link to a website he described as a Hamas website, along with screenshots showing how to use a feature to send donations in bitcoin to the group. Xie later used the site to send Hamas $20 in bitcoin to see if the feature worked, prosecutors said.

And when he was asked in an April Instagram Live video whether he would travel to Gaza and join Hamas, Xie allegedly responded, "If I could find a way." In the same video, Xi showed off a Hamas flag and a handgun. Investigators determined the gun was likely registered in Xie's father's name.

Later in the video, he said, “I’m gonna go to the [expletive] pro-Israel march and I’m going to shoot everybody.”

“I want to shoot the pro-israel demonstrators ... you can get a gun and shoot your way through or use a vehicle and ram people," Xie said in following Instagram posts, according to prosecutors.

"I do not care if security forces come after me," he wrote. "They will have to put a bullet in my head to stop me.”

"Someone needs to get a truck full of explosives and blow up the Coachella event. Watch their blood and their dead bodies litter the streets," Xie posted on Instagram on April 26, the criminal complaint said.

Earlier in the year, Xie had stated he wanted to join the U.S. Army "to learn how to kill… So I can use that knowledge,'" according to prosecutors. “Idk [I don’t know] if I pass the training…If I should do lone wolf. That is why I have to learn military techniques from the Army," he continued.

He applied for national security positions, and on two applications answered "no" to the question, “Have you EVER associated with anyone involved in activities to further terrorism?”

Investigators also uncovered a YouTube account belonging to Xie, "many of which advocated or propagandized Soldiers for Allah, the war in Syria, Hezbollah (a foreign terrorist organization), and the Houthi movement in Yemen, as well as support for Bashar al Assad, Saddam Hussein, and North Korea," prosecutors said.

“Homegrown violent extremists like Xie are a serious threat to national security,” U.S. Attorney Craig Carpenito said in the statement Wednesday. “The actions that he took and planned to take made that threat both clear and present."

"We will continue to do everything in our power to safeguard our country and its citizens from the threat of terrorism, whether that threat comes from abroad or — as here — from within," Carpenito added.

Xie was due in federal court in New Jersey at 2:30 p.m. on Wednesday.

If convicted on all counts, Xie could face decades in prison and more than $1 million in fines.