An American man was sentenced to 22.5 years in prison Thursday after trying to recruit FBI informants to the Islamic State group in Syria.

Mufid Elfgeeh, 32, from Rochester in upstate New York, pleaded guilty in December to attempting to provide material support to the extremists and was described by prosecutors as “one of the first” IS recruiters captured in the United States.

Prosecutors said Elfgeeh spread IS propaganda on social media, sought funds for extremists and attempted to recruit and send two individuals — both of whom were cooperating with the FBI — to Syria to fight with IS.

He was sentenced on the same day that US Secretary of State John Kerry said the IS group’s slaughter of Christians, Yazidis and Shiites amounts to genocide.

“While we are confident that keeping Mr Elfgeeh in prison for the next two decades will keep us safer, there continues to exist a pervasive, persistent and ever-changing terrorism threat,” said Adam Cohen, FBI chief in Buffalo, New York.

“This threat remains among the highest priorities for the FBI and the intelligence community.”

Prosecutors said he sent IS propaganda videos to one would-be fighter, arranged for an English-speaking contact in Iraq to communicate with that person via Facebook and paid $240 to help the individual obtain a passport.

Elfgeeh also bought the pair of FBI informants a laptop and a camera to take to Syria, offered them tips on how to travel without being detected and arranged for a contact overseas to coordinate the logistics of the trip.

Prosecutors say Elfgeeh sent $600 to a third person in Yemen also destined to help them travel to Syria to join the IS group.