An East African man has pleaded guilty in New York to U.S. charges he supported terrorism by associating with a violent extremist group in Somalia.

Mohamed Ibrahim Ahmed entered the plea Wednesday in federal court in Manhattan.

Ahmed was detained in Nigeria in 2009 before being turned over to U.S. authorities. Prosecutors in New York had accused the Eritrean (ehr-ih-TREE'-uhn) man of receiving explosives training, buying an assault rifle and raising money for al-Shabaab.

Al-Shabaab was designated by the United States as a terrorist group in 2008.

Ahmed faces a possible 10-year prison term at sentencing Nov. 2.