The leader of the Islamic State militant group that controls parts of Syria and Iraq has accepted a pledge of allegiance from Nigerian Islamists Boko Haram, his spokesman said in an audio message transmitted on Thursday.

"Our caliph, God save him, has accepted the pledge of loyalty of our brothers of Boko Haram so we congratulate Muslims and our jihadi brothers in West Africa," spokesman Abu Mohammad al-Adnani said, referring to Islamic State leader Abu Bakr al-Baghdadi.

Islamic State, an ultra-hardline offshoot of al-Qaida, has declared a caliphate in captured territory in Iraq and Syria and has gained global notoriety for killing or kidnapping members of religious minorities and posting videos of its members killing Arab and Western hostages.