Although the so-called Islamic State (IS) has lost its territory in Syria and Iraq, its West African affiliate continues to carry out attacks in African countries like Nigeria, with the group now claiming responsibility for the killing of 29 Nigerian soldiers.

The Islamic State West Africa Province on Monday attacked an army barracks in the northeastern Nigerian city of Gubio, killing 20 soldiers, an anonymous humanitarian worker and a security source told Reuters. The group also published a separate unverified video Wednesday of the organization killing nine Nigerian soldiers. 

The Nigerian army has not yet responded to the claims.

The Nigerian military is currently in a war against the Islamic State West Africa Province, along with its rivaling jihadist group Boko Haram. The conflict has resulted in more than 30,000 fatalities.

The Islamic State West Africa Province is now proving to be a formidable challenge for security forces in the region as the group carried out its first attack in the Democratic Republic of the Congo in April. The Islamic State's Amaq news service said the group killed three Congolese soldiers.

The Islamic State West Africa Province follows the same leader as the Middle Eastern version, Abu-Bakr al-Baghdadi, and is hoping to make up for the loss of territory the group suffered in Syria and Iraq.

 "The loss of the core, the Caliphate, was a huge blow to them," Thomas Abi-Hanna, a security analyst with Stratfor told Bloomberg Businessweek. "They are really trying to play up the gains they've made elsewhere and Africa's arguably the place where they've made the most gains."     

The Islamic State became a prominent global security issue when in 2014, the group rampaged across the Middle East and took control of a large part of Syria and Iraq. From its so-called capital in the Syrian city of Raqqa, the Islamic State inspired a series of attacks in cities such as Paris and Brussels. These attacks prompted a bombing campaign against the group, led by the United States, the United Kingdom and other countries, that led to the dismantling of the group's "Caliphate" in Syria and Iraq.