A New York man who pledged his support to the Islamic State has been arrested for trying to help the “terrorist organization bent on killing Americans” and for encouraging attacks on U.S. soil, officials said.

Zachary Clark, 40, was arrested Wednesday in Brooklyn, the U.S. Attorney’s Office said in a news release. Further details weren’t immediately available.

MISSOURI MAN FROM BOSNIA WHO AIDED ISIS GETS 8-YEAR PRISON TERM, FACES DEPORTATION

“Today’s arrest in Brooklyn is a reminder that New York City remains a top terrorism target in the United States,” NYPD Commissioner James P. O’Neill said. “The NYPD and all of our law enforcement partners remain vigilant in this ongoing fight against terror and anyone who would plot to do us harm.”

Earlier this year, Clark had pledged allegiance to then-ISIS leader Abu Bakr al-Baghdadi and again to its new leader, Abu Ibrahim al-Sashemi al-Qurayshi, following Baghdadi’s death in a U.S. Special Forces raid in October, prosecutors said.

Beginning in at least March 2019, Clark posted on encrypted pro-ISIS chat rooms, where he shared instructions on how to carry out terror attacks on U.S. soil and encouraged “lone wolf” attacks in New York City and other well-populated areas, a criminal complaint said.

US-BORN ALABAMA WOMAN WHO JOINED ISIS IS NOT AN AMERICAN CITIZEN, JUDGE RULES

He allegedly posted maps and images of New York’s subway system and other specific targets.

He also posted a bomb-making manual and another entitled “Knife Attacks,” officials said.

“Thanks to the Joint Terrorist Task Force, Clark now faces serious criminal charges for his alleged support of a terrorist organization bent on killing Americans,” U.S. Attorney Geoffrey S. Berman said.

CLICK HERE FOR THE FOX NEWS APP

The 40-year-old was charged with providing material support to ISIS and distributing information relating to explosives and weapons of mass destruction. He faces a maximum sentence of 40 years in prison.

Fox News' Marta Dhanis contributed to this report.