Abdullahi Yusuf, one of nine young men arrested in a sweeping FBI probe of ISIS recruitment in Minnesota, on Thursday became one of the few Americans to be allowed back in society after trying to join the terror group.

A federal judge in Minneapolis granted Yusuf, 21, supervised release from the federal halfway house where he has been held since his sentencing in November 2016.

Escorted to the federal courthouse in Minneapolis on Thursday morning by FBI agents, Yusuf left the building with his parents. He will return to their Burnsville home for the first time since his arrest three years ago.

"We're just very glad to meet again our son," Yusuf's father, Sadiik Yusuf, told reporters after Thursday's hearing. "We will be ready to help him."

Yusuf cooperated with federal authorities during the investigation and was the first of the nine co-defendants eligible for release — albeit under intense federal supervision. He was sentenced last year to time served after spending nearly two years in detention and has been staying at a federal halfway house in the Twin Cities.

Senior U.S. District Judge Michael Davis, who oversaw last year's landmark ISIS recruitment trial in Minneapolis, granted Yusuf's release after spending 45 minutes closely questioning both the young man and officials from the U.S. Probation and Pretrial Services office in Minnesota. As part of his sentence, Yusuf must remain under supervision for 20 years.

Eric Hermes, Yusuf's probation officer, testified that while in the halfway house, Yusuf earned his high school diploma, underwent counseling and participated in community service. Yusuf even became a role model for other residents, Hermes said, and recently gave up his own room for another resident who suffered a stroke.

"He continues to set goals for himself as he moves forward," Hermes testified.

Before making his decision, Davis acknowledged a complicated path ahead, partly because of Yusuf's decision to testify against three former friends who stood trial last year. Yusuf's extensive cooperation led to a substantially lesser sentence but also provoked an outburst by a spectator while Yusuf was at the witness stand last year.

"Are you ready to come out? You understand that you're going to have a lot of difficulties. You're going to be ostracized by your own community — at least a certain part of it — you understand that?"

"Yes, your honor," Yusuf replied.

After they left the courtroom Thursday, Yusuf's parents embraced the same FBI agents who arrested their son in 2014. They have said they believe that, by stopping him from leaving the country, the agents saved their son's life.

"I'm really happy for Abdullahi," Yusuf's attorney, Manny Atwal, said in an interview Thursday. "I've known him now for three years and I can see the positive changes in him."

Atwal said Yusuf understood that he would need to "take things slow" while transitioning back to life at home. He will soon meet with his probation officer to discuss future education and employment plans, which will require Davis' approval.

Among other conditions set by Davis, Yusuf will be barred from social media and accessing materials related to extremism. His internet use will be monitored and his movements will be tracked via GPS for one year. Davis also barred any contact with journalists without his permission.

Yusuf was the first of nine Twin Cities men arrested in 2014 and 2015 for their roles in attempting to follow multiple friends overseas to fight alongside ISIS militants. It was Yusuf's suspicious interview with a passport specialist, in April 2014, that touched off a yearlong investigation into the group as the friends made plans to travel to Turkey and cross into Syria.

The next month, FBI agents stopped Yusuf at Minneapolis-St. Paul International Airport from boarding a flight to Istanbul. Abdi Nur, a friend who was later charged in absentia, avoided FBI detection and left the country the next day. One of several Minnesotans confirmed to have joined ISIS, Nur is now believed dead.

As Yusuf awaited sentencing, Davis approved his participation in the nation's first pretrial jihadi rehabilitation program. The experiment drew international attention and matched Yusuf with a mentor and civic engagement curriculum developed by the Minneapolis nonprofit Heartland Democracy.

Abdirizak Warsame, the only other defendant to cooperate with authorities in the case, is scheduled for release from an Illinois federal prison in March 2018. Four other defendants, who pleaded guilty, received 10-year prison terms last year; three others, who fought the federal charges and were convicted after a weekslong trial, are serving 30- to 35-year sentences.

Federal agents and prosecutors in Minnesota have taken an interest in Yusuf's rehabilitation, occasionally visiting him over the past year and sharing books with him. The federal prosecutors who led the government's case raised no objections to Yusuf's release on Thursday.

"Is there anything in the government's eyes that through their investigation … he should not be released?" Davis asked.

"No, your honor, none whatsoever," said Assistant U.S. Attorney John Docherty.

Twitter: @smontemayor