A St. Louis Park man pleaded guilty Wednesday to joining an ISIS battalion trained to unleash suicide terror attacks in Europe.

Abdelhamid Al-Madioum, 24, admitted in U.S. District Court in Minneapolis to providing material support to a designated foreign terrorist organization.

Federal guidelines call for him to be sentenced to the maximum of 20 years in prison followed by anywhere from five years to life under supervised release.

The defense has the right to argue for less time in prison during sentencing on May 26 before Judge Ann Montgomery, who has wide latitude to deviate from the advisory guidelines. In the meantime, Al-Madioum remains in the Sherburne County jail.

Defense attorney Manny Atwal told the Star Tribune that her client admitted his guilt "because he really wanted to take responsibility," and the plea also erases the "potential of more exposure" to further charges in the case.

The terms of the plea did not address whether Al-Madioum might provide the government with anything he learned while overseas that could prove beneficial in fighting terrorism. "I really can't comment on that," Atwal said.

She did say the family is grateful that he is "taking responsibility, and they're glad he is alive."

Al-Madioum, who lost much of his right arm from an apparent air assault in Iraq, was captured overseas by the Syrian Democratic Forces (SDF), the major fighting force against ISIS, in March 2019. The SDF then turned him over to the FBI.

While in the Middle East, Al-Madioum also suffered severe injuries to both legs and his left foot along with nerve damage, court documents revealed.

In his guilty plea, Al-Madioum admitted to the entirety of the allegations spelled out in the criminal complaint filed in September, including that at age 18 he and his family traveled in mid-2015 to see relatives in Casablanca, Morocco, where he left without his parents' knowledge for Istanbul and then on to Iraq and Syria.

The native Moroccan and naturalized U.S. citizen soon joined ISIS and remained among its forces until his capture nearly four years later.

Al-Madioum studied engineering at Normandale Community College in Bloomington from June 2014 to May 2015. According to a federal search warrant, he also worked for the college's IT department. Interviews with former classmates following a 2017 Star Tribune report on his disappearance painted a picture of an easygoing man who liked cracking jokes and had an affinity for marijuana.

Former friends say he grew more devout in his Muslim faith and became withdrawn not long after his family caught him with marijuana.

Family members told authorities that while in Casablanca they awoke one morning and discovered that Al-Madioum was gone, along with his passport and cellphone.

FBI agents searched the family's home in St. Louis Park about a month later and found notes he wrote expressing his intent to join ISIS.

In fall 2016, Al-Madioum was assigned as a soldier in a battalion whose duties included "preparing foreign fighters to conduct suicide attacks in European countries," the complaint read. But in an interview with CBS News last year in Syria after his arrest, Al-Madioum said he never fought for ISIS. He also told National Public Radio that he was there only to study medicine.

By March 2019, ISIS territory had withered under SDF assaults to a small village on the Syria-Iraq border. Al-Madioum was among others who surrendered to the SDF.