A New York man who attempted to join the Islamic State was sentenced to 20 years in prison after he tried to provide material support to the terror group and boasted about how easy it would be to carry out an attack in Times Square.

Mohamed Rafik Naji, 40, became a “committed supporter” of ISIS in 2014, according to the Department of Justice. He traveled to Yemen in an attempt to join the terror group in March 2015, said federal authorities.

After returning to the United States in September 2015, Naji repeatedly distributed pro-ISIS messages on social media and advised an individual on how to travel overseas and join the terrorist group.

That individual was a confidential FBI informant, the Justice Department said in a press release Friday. Naji went on to tell the informant that he had pledged an allegiance to ISIS, saying “I belong to the Islamic State only.” He also discussed the potential for carrying out a terrorist attack in Times Square, suggesting that a garbage truck could be driven into a crowd of pedestrians.

Naji was arrested in 2016 and pleaded guilty to charges of attempting to provide material support to terrorists in 2018. He was sentenced to 20 years in federal prison on Friday.

“Extremists like Mr. Naji believe murdering innocent people advances their political agendas,” said FBI Assistant Director-in-Charge Sweeney. “In the end, Mr. Naji, like many others before him, find the only thing their actions lead to is a different vantage point from which to watch the world pass by — through the steel bars of a federal prison.”