A Maryland man who authorities say traveled to Somalia and became a fighter for an al-Qaida-linked extremist group has been sentenced in New York to 35 years in prison.

Thirty-three-year-old Maalik Alim Jones was sentenced on Tuesday after pleading guilty to federal terrorism charges.

Prosecutors say Jones trained with and supported al-Shabab, an ultra-conservative Islamic militant group. The group seeks to run Somalia under a strict interpretation of Shariah law.

The Baltimore man was turned over to the U.S. by Somali authorities who arrested him in 2015 as he allegedly tried to get on a boat to travel to Yemen.

Authorities say Jones confessed to fighting Kenyan government soldiers in a battle until he was injured by a missile. They say he admitted to getting paid $100 monthly by al-Shabab.