A Rochester, N.Y., man was arrested and charged on Thursday as a result of his alleged plot to carry out a New Year's Eve attack with knives and a machete in upstate New York, according to ABC News.

Emanuel Lutchman, 25, was caught as part of an FBI sting and intended to use the weapons provided by the paid informants to make an attack on a bar, according to ABC News.

The FBI reported that he made a video pledging his allegiance to IS leader Abu Bakr al-Baghdadi prior to his arrest and that he had originally come to the attention of authorities through his online engagement with the terrorist group, according to BBC News.

Lutchman is a convert to Islam and a former convict who wanted to gain favor with the Islamic State group by killing non-Muslims, according to NBC News.

He was reportedly in contact with members of the group in Syria and was encouraged to "do operations and kill some kuffar" over the holiday period, according to NBC News.

Lutchman has a history of mental health problems that have been present since childhood, with his grandmother telling NBC News that he had recently attempted suicide by stabbing himself through the stomach.

"I will take a life, I don't have a problem with that," Lutchman is quoted as saying in court documents, according to BBC News.

He was charged with attempting to provide material support to IS and could serve up to 20 years in prison, according to Yahoo! News.

Rochester's annual New Year's Eve fireworks celebration was cancelled as a result of the attack so that police officers could be redistributed across the city, according to ABC News.

Federal prosecutor William Hochul warned like-minded individuals from carrying out similar attacks in the name of IS, speaking of "our determination to immediately stop any who would cause harm in his name," according to Yahoo! News.

"You will be caught, you will be prosecuted, and you will be punished," Hochul said.