A former Chicago college student was sentenced to 7 1/2 years in federal prison for attempting to help the Islamic State group.

Thomas Osadzinski, 23, designed, used, and taught a computer program to disseminate violent propaganda online, according to the U.S. Department of Justice. He was convicted last year of attempting to provide material support and resources to a foreign terrorist organization.

The sentence handed down Thursday was less than the 15 years prosecutors had sought.

IL SECURITY GUARD FATALLY SHOT AT CHICAGO-AREA SHOPPING MALL

The former DePaul computer science student has been in custody since being arrested in Chicago in 2019 during an FBI sting.

Defense attorneys painted Osadzinski, who was born and raised in the Chicago suburb Northbrook, as a naive student who "got sucked in" to radical ideologies, the Chicago Tribune reported.

Illinois news, Peoria news

A former DePaul student has been sentenced to more than seven years in prison for attempting to help the Islamic State group.

His attorney, Joshua Herman, told AP: "This sentence will allow Tommy to have a life, which is all he and his family asked for." Herman added that the defense plans to appeal based on First Amendment issues.

CHICAGO MAYOR LORI LIGHTFOOT ROASTED FOR NEW CAMPAIGN AD: 'JUST RESIGN IN DISGRACE'

Before Osadzinski was sentenced, he apologized to his parents in the courtroom and told the judge, "I completely reject ISIS."

U.S. District Judge Robert Gettleman, who ordered that the prison term be followed by 10 years of court-supervised release, said there was a wide gulf between poor judgment and Osadzinski’s conduct, which included pledging fealty to a "hideous group" such as the Islamic State and "promoting and encouraging" its violent message around the globe.

CLICK HERE TO GET THE FOX NEWS APP

"I think you understand now how serious this is," Gettleman told Osadzinski. "You have shown remorse. Is it genuine? I hope so."

The FBI said in a criminal complaint that Osadzinski boasted that he would use a gun and explosives to elude authorities if need be.