A small business owner in upstate New York was indicted for allegedly funding the extreme terrorist group known as the Islamic State or ISIS and plotting to murder U.S. military members who served in Iraq.

According to federal authorities, Mufid A. Elfgeeh, a 30-year-old naturalized citizen from Yemen, tried to send jihadists to Syria to "fight on behalf of ISIS," reports NBC News. He also tried to purchase two handguns with silencers, which he planned to use to execute a mass shooting targeting Shia Muslims in his area and American service members.

Earlier this year, the suspect "purchased two handguns equipped with ... silencers and ammunition'' for $1,050, read a seven-count federal indictment that was submitted to a grand jury, USA Today reports.

Unaware that he was interacting with two FBI informants, Elfgeeh allegedly helped prepare them to travel to Syria. He also sent "$600 to an individual in Yemen for the purpose of assisting that individual in traveling from Yemen to Syria for the purpose of joining and fighting on behalf of ISIL,'' court documents said.

Elfgeeh, who owned a food store in Rochester, was originally arrested in May on firearm charges, but federal prosecutors indicted him on recruitment charges on Tuesday.

FBI agents began investigating him a year ago after he posted self-incriminating Twitter messages about ISIS and al Qaeda and urged people to donate money to the terror groups.

"Al Qaeda said it loud and clear: we are fighting the American invasion and their hegemony over the earth and the people," he tweeted, according to CNN. In another tweet, he purportedly stated that ISIS "will one day rule the world with the will of Allah."

Elfgeeh's public defender, Mark Hosken, said that the suspect will enter a not guilty plea when he appears before U.S. Magistrate Judge Jonathan Feldman for an arraignment on Thursday.

He is facing three counts of attempting "to provide material support to a foreign terrorist organization," one count of trying to kill "officers and employees of the United States," two counts for possession of an unregistered firearm silencer, and one count of possession of firearms and silencers "in furtherance of a violent crime," states the indictment.

The firearms charges carry the hashes sentence, which is life in prison.