A case involving a 21-year-old from suburban Chicago who wanted to go to Syria to join the Islamic State highlights the quandary of dealing with impressionable young Muslims in the U.S. who fall under the sway of the militant group's online recruiters, a federal judge said Friday as he sentenced the man to just over three years in prison.

With time served since his arrest at a Chicago airport in 2014, Mohammed Hamzah Khan will be released late next year, after which his attorneys say he intends to enroll in college. Kahn will also be subject to an exceptionally long 20 years of close monitoring that prosecutors characterized as among the strictest ever in the district.

Kahn could have faced up to 15 years in prison. Prosecutors had asked for a five-year sentence, saying Khan's cooperation in identifying two IS recruiters justified leniency. The defense had asked for the sentence Judge John Tharp ended up imposing.

Tharp said he couldn't reconcile Khan's desire to join IS as a 19-year-old with portrayals by family and friends of him as caring and quick to help others. The judge's explanation was that Khan had led a "sheltered" existence at his parents' home in Bolingbrook and so was "vulnerable to being preyed on by terrorists."

"The real issue here is risk: What is the risk that you pose to the public?" he said.

Tharp said he couldn't gauge Khan's sincerity about now rejecting IS. But he agreed that counseling and education to broaden his world view is what Kahn needs most. A long prison term, the judge said, could make Khan more, not less dangerous, and wouldn't ensure he never looked to a terrorist group again.

"This isn't what our prison system was made to do," Tharp added.

Standing in orange jail garb — his mother and father on a nearby spectator's bench — Khan showed little emotion during Friday's sentencing hearing in Chicago. Defendants typically appeal for leniency, but when Tharp asked whether he wanted to speak, Khan answered: "I don't wish to make any statement right now."

Defense lawyer Thomas Durkin had argued that individuals such as Khan should not be written off without a second chance for succumbing to adept IS propagandists who wooed them over the internet.

"Do we give in to the fear that we cannot trust that this kid will ever change?" Durkin said. "I think he deserves a chance."

Agents detained Khan with two younger siblings as they tried to board a plane at O'Hare International Airport. Prosecutors say Khan helped indoctrinate his brother and sister, who also aspired to live in IS, though they were never charged. Khan left a letter before leaving for O'Hare expressing anger over U.S.-backed bombing of IS.

Khan's mother, Zarine Khan, told reporters last year that IS had brainwashed her son. And she added about Islamic State: "Leave our children alone!"

Tharp said he couldn't accept that Khan's hope was to get a non-military job in Syria, saying the Islamic State would surely press any young man into fighting.

"I don't believe for a second ... that you would go to Syria and work as a chef," he said.

Defense attorneys argued Khan now grasped that his ideas about IS were "unrealistic" and that he no longer glorified its trademark brutality.

Before adjourning, the judge contrasted the image of brutal executions in IS-controlled territory against Khan's treatment in Chicago federal court.

"Instead of public beheading, you've been given a public ... proceeding," Tharp said. "The enemy government has not tried to kill you. It has tried to help you."

A case involving a 21-year-old from suburban Chicago who wanted to go to Syria to join the Islamic State highlights the quandary of dealing with impressionable young Muslims in the U.S. who fall under the sway of the militant group's online recruiters, a...