A Nigerian man who took part in a Yemen-based al-Qaida faction's effort to spread propaganda intended to encourage terror attacks has been sentenced in New York to 22 years in prison.

Lawal Olaniyi Babafemi was sentenced Wednesday in federal court in Brooklyn after pleading guilty to providing material support to al-Qaida in the Arabian Peninsula.

The 35-year-old Babafemi was extradited in 2013 from Nigeria. U.S. prosecutors say he traveled to Yemen in 2010 to help the al-Qaida group recruit English speakers for its media operations.

The operations included publication of an online magazine for aspiring terrorists. The magazine has published recipes for homemade bombs and suggested targets in the United States and elsewhere.