ROCHESTER, N.Y. (WIVB) — An admitted terrorist sympathizer will spend decades of his life behind bars after pleading guilty and being sentenced for attempting to recruit for a dangerous terrorist organization.

Officials say a judge sentenced Mufid Elfgeeh to 22 and a half years behind bars and 27 years of post-release supervision on Thursday when he appeared in court for sentencing. Elfgeeh, a naturalized U.S. citizen originally from Yemen, formerly operated a business in Rochester.

Elfgeeh is the first ISIL recruiter successfully prosecuted in the United States, and possibly the world, according to Buffalo-based U.S. Attorney William Hochul. Elfgeeh, 32, admitted he attempted to provide material support to ISIL by attempting to recruit people and raise funds for the group.

Officials say he received the longest prison sentence for a terrorism suspect who’s been convicted of supporting ISIL.

“ISIL’s horrific violence is waged against men, women and children, as well as against Muslims and non-Muslims alike,” Assistant Attorney General for National Security John Carlin, said. “The National Security Division will continue to vigorously investigate and prosecute anyone who seeks to provide material support to the designated foreign terrorist organization.”

In December, Elfgeeh admitted to two counts of providing material support for a known terrorist organization, telling the court he tried to recruit two people in 2013 and 2014 to join ISIL fighters in Syria.

Officials say they’re glad law enforcement moved in to arrest Elfgeeh when they did. U.S. District Court Judge Elizabeth Wolford said Elfgeeh was growing increasingly aggressive, and had bought two guns equipped with silencers.

“You were clearly on a path to destruction, and you engaged in some very dangerous activity,” she said.

“I don’t know if we’d all be here,” she added after lauding the FBI’s efforts. “Some real tragedies could’ve occurred if you weren’t arrested here.”

Elfgeeh’s attorney Mark Hosken read a statement prepared by his client to the court. In it, Elfgeeh recounted a life that brought him to the Brooklyn at age 13. His father returned to Yemen after a year, leaving the 14-year-old to fend for himself. He said that year he was slashed across the face with a box cutter during a robbery in a New York subway, and that changed his life forever.

Elfgeeh said he eventually dropped out of high school, and began paying attention more to world politics. He moved for years, working at various gas stations and convenience stores across the country, according to Hosken, before settling in Rochester in 2012 because of its large Yemen population.

Elfgeeh told the court he started noticing the atrocities in Syria, and said the U.S. government did little to help Muslims under attack by the Assad regime. That’s when he grew attached to ISIL, because he said they were one of the first groups to help Syrian Muslims.

But he said violent acts by ISIL during the past few years turned him off, writing in his statement, “I no longer support ISIL. I want to avoid being misguided as I was in the past.”

Despite his dismissal of ISIL, he will spend more than 50 years under government surveillance. When the U.S. corrections system is done monitoring Elfgeeh, he will be 81-years-old.