"An Eritrean man who admitted to having ties to the al Qaeda-linked militant group al Shabaab was sentenced on Wednesday to 9-1/4 years in prison, U.S. Attorney Preet Bharara in Manhattan said.

Mohamed Ibrahim Ahmed pleaded guilty in June to conspiring to provide material support to al Shabaab, and to conspiring to receive military-type training from the group.

Ahmed, 38, was arrested in Nigeria in November 2009 and brought to Manhattan federal court to face U.S. terrorism charges in March 2010. He is an Eritrean national and a permanent resident of Sweden.

"Mohamed Ibrahim Ahmed traveled thousands of miles to align himself with al Shabaab to aid their campaign of terror and to learn their 'ways of war,'" Bharara said in a statement. "Today, his journey ends in prison."