When the Nigerian jihadist group popularly known as Boko Haram publicly pledged its allegiance to the Islamic State in March 2015, this new alliance made perfect sense to both groups. For the Islamic State, Boko Haram’s pledge of allegiance (bayat) was a powerful symbol that it was winning the intra-jihadist competition with its mother organization al-Qaeda, with one observer describing the Nigerian group’s shifting allegiance as “a huge defeat for al-Qaeda and a huge coup for” the Islamic State. The potential upside for Boko Haram could also be discerned easily. One analyst observed that the Islamic State has “the ability to export know-how,” and that doing so in Nigeria could mean that “the already quite substantial problems of containing Boko Haram become that much harder.” But this relationship did not work out as planned.

During the course of a strategic communication project we both worked on in Nigeria earlier this year, we discovered that key leaders in Boko Haram almost certainly regretted joining the Islamic State. Had it remained a part of al-Qaeda, which has a far stronger African network, Boko Haram would almost certainly be a more potent organization today. After completing our work in Nigeria, we co-authored an article for Foreign Policy arguing that Boko Haram was experiencing “buyer’s remorse” over its pledge to the Islamic State, and that al-Qaeda would likely try to exploit this sentiment within the group by attempting to peel Boko Haram away from the Islamic State (though it would not necessarily want the organization to openly align with al-Qaeda). Shortly after our article was published, Gen. Thomas Waldhauser, the nominee to lead the U.S. Africa Command, said at his nomination hearing that Boko Haram has fractured, with about half of the group breaking off “because they were not happy with the amount of buy-in, if you will, from Boko Haram into the ISIL brand.” The Islamic State subsequently announced that Boko Haram’s erratic and enigmatic leader Abubakar Shekau, whose faction was seen as too independent, had been replaced by Abu Musab al-Barnawi.

We have many reasons to question the long-term sustainability of the relationship between the new leadership that the Islamic State appointed in Boko Haram — which has taken on the new name of the Islamic State’s West African Province — and the Islamic State itself. Al-Qaeda will likely patiently wait for that relationship to fail just as the relationship with Shekau failed, and then try to pick up the pieces.

Shekau vs. Barnawi: A War of Words

On August 3, the Islamic State announced in an interview of Barnawi published in its Arabic-language magazine Al-Naba that Barnawi is the new wali, or governor, of the Nigeria-based militant organization. Barnawi is the son of the late Boko Haram founder Mohammed Yusuf, for whom Shekau had served as a deputy.

Shekau, who had led Boko Haram since 2010, immediately followed this announcement with his own audio release acknowledging that he was no longer the group’s wali. The audio message mentioned that he had reverted to his previous role as the imam of Jamaatu Ahl al-Sunna lil-Dawa wal-Jihad, or JAS, which is the original name of Boko Haram. Shekau’s choice of language when stating the group’s name is significant, as Shekau is asserting his authority over a construct that exists independent of the Islamic State’s West African Province. Shekau said he still recognized Abu Bakr al-Baghdadi as the Islamic State’s caliph, but that his rivals in Barnawi’s faction had staged a coup against him by manipulating the Islamic State’s leadership and cutting Shekau off from corresponding with Baghdadi. This claim deliberately parallels Shekau’s position to the Islamic State’s at the time of its split from al-Qaeda: It is exactly what the Islamic State alleged that Abu Khalid al-Suri had done to them with respect to al-Qaeda’s senior leadership from 2013 until the Islamic State’s final expulsion from the al-Qaeda network. Further drawing that parallel, Shekau lamented that Baghdadi had not responded to his messages about Barnawi’s acts of “great polytheism.” Lack of responsiveness was one of the Islamic State’s grievances against al-Qaeda

Barnawi’s faction has a clear position on Shekau. Its perspective is explained in detail in a private audio by Barnawi’s ally Mamman Nur that has since been made public. A Cameroonian who served as a liaison between Boko Haram and al-Qaeda in the Islamic Maghreb (AQIM) and had masterminded the attack on the United Nations’ headquarters in Abuja in 2011, Nur discussed Shekau’s excessive takfirism in the audio recording. Another speaker on the same audio, Abu Fatima, listed members of Barnawi’s faction that Shekau’s faction had killed “without evidence.”

On August 7, Shekau appeared in a video for the first time since February 2015. In the first part of the video, a masked militant led more than 100 fighters in a march before giving a speech directed to Baghdadi. In it, the militant said that the “soldiers of JAS” stand with Shekau, and claimed that Baghdadi did not respond to any of Shekau’s eight messages to Baghdadi. Though the masked militant described news of Barnawi’s appointment as wali as “sudden,” he said JAS would not remove its allegiance to Baghdadi—but they would also not follow Barnawi, who is not “authentically salafist.” Toward the end of the video, a camouflage-clad Shekau fires a gun in the air while two militants stand beside him in what appears to be northeastern Nigeria’s Sambisa Forest. The video also carried the JAS logo, rather than that used by the Islamic State’s West African Province. The logo utilized may be another sign that Shekau is resurrecting an organization that exists outside the Islamic State’s formal structure. (This logo appeared once again on August 14, when Shekau’s trusted spokesman interviewed the captured Chibok schoolgirls in a new JAS video.)

Is Barnawi a Mole?

There is reason to believe that the leadership of Barnawi’s faction retains a latent affinity for al-Qaeda, even though they are now publicly loyal to Baghdadi. This can be seen in the pedigree of Barnawi’s faction, which recalls previous factions that sought to rival Shekau.

Since Shekau assumed leadership of Boko Haram in 2010 after Nigerian security forces killed Mohammed Yusuf (Barnawi’s father), two main rival factions have contested Shekau’s leadership. In 2011, the Yusufiya Islamic Movement distributed flyers in Borno State criticizing Shekau’s killing of innocent Muslim civilians. In 2012, Ansaru announced its formation in Kano after Shekau ordered an attack in the city that killed more than 200 people, mostly Muslims. Ansaru’s Nigerian leaders had been trained by AQIM, and subscribed to al-Qaeda’s limitations on targeting civilians (relative to the Islamic State).

Yet, like the Yusufiya Islamic Movement before it, Ansaru eventually became largely dormant — due to Shekau killing its members, Nigerian counterterrorism operations against its cells, and the disruption of AQIM’s networks in Mali after the French-led intervention in 2013. As the environment for AQIM became more permissive in Mali in 2014-15, external support for Ansaru resumed, and the group was attempting to reassert itself up until its leader Khalid al-Barnawi was captured in early 2016. Shekau thus retained Boko Haram’s dominant leadership position in the face of these challenges, and even incorporated some Ansaru defectors into its ranks ahead of Boko Haram’s push to join the Islamic State in 2015. This may have been a marriage of convenience for Ansaru members who were on the run — as well as a desire for survival, safe haven, and access to greater resources — rather than a sign of true loyalty to Shekau. Thus, the fact that Abu Musab al-Barnawi’s faction has ascended to Boko Haram’s leadership today at the expense of the deposed Shekau represents the first time a rival faction has overcome Shekau.

Barnawi’s understanding of theology and strategy resembles that of the Yusufiya Islamic Movement and Ansaru. His allies include AQIM-trained Mamman Nur and the above-mentioned Abu Fatima, who was Ansaru’s commander of suicide operations. Moreover, his first video appearance in January 2015 carried some hallmarks of Ansaru messaging. Thus, the current Boko Haram leadership under Barnawi appears to be neo-Ansaru in ideology, but nonetheless expresses its loyalty to the Islamic State. This apparent paradox can be resolved through one of two explanations. First, a number of AQIM factions and “front groups” in northwest Africa have joined the Islamic State out of a shared vision of an Islamic state, but not due to a truly shared ideology. Barnawi is in accord with the Islamic State in the desire for declaration of sharia-based governance in West Africa. Barnawi’s “switch” from al-Qaeda to the Islamic State is thus consistent with some shifting jihadist loyalties in the region, as well as Barnawi’s short-term objectives. Second, and more sinister from the Islamic State’s perspective, Barnawi’s faction may have joined with Shekau in order to finally depose him. To formalize a relationship with the Islamic State, Barnawi’s faction had to merge with Shekau’s to show the Islamic State that Boko Haram had sufficient unity in its ranks to make the pledge. By merging with Shekau under this “general command” while controlling the connections to the Islamic State, Barnawi’s faction was able to bring in Shekau before the pledge but also cut him off from communicating with the Islamic State afterward. Barnawi’s faction apparently convinced the Islamic State to remove Shekau from his leadership role in favor of Barnawi.

While the idea of Barnawi being motivated to join the Islamic State in order to overthrow Shekau may seem conspiratorial, it is consistent with Boko Haram’s ongoing internal intrigues under Shekau. To a lesser extent, it is also consistent with a trend of al-Qaeda members infiltrating Islamic State provinces to weaken, divide, and sow discord in the movement’s ranks. This has occurred in upstart Islamic State provinces in Yemen and Afghanistan — and even at the highest levels of the group, as evidenced by the presence of the high-level dissident and “whistleblower” known by his Twitter handle @wikibaghdady.

Thus, Barnawi’s faction appears to have killed two birds with one stone. It joined the Islamic State, with whom it shared a vision of announcing an Islamic state in West Africa, and it marginalized Shekau. The Islamic State’s provinces in Libya were supposed to provide new resources and weapons to Boko Haram, but this never panned out: There has been no influx of funds or foreign fighters.

The Path Out of the Islamic State

If the Islamic State can provide Boko Haram with no further resources or support, there may be little incentive for it to remain with the Islamic State in the long term. Barnawi may even switch his allegiance to al-Qaeda — even if he is not open about such association, a model al-Qaeda is clearly moving toward with the Nusra Front’s recent “dissociation.” Al-Qaeda’s affiliates are waging an increasingly powerful insurgency in nearby Mali, and a switch to al-Qaeda would also allow Barnawi to receive resources from al-Qaeda in Mali. An alliance with al-Qaeda also would be more consistent with Barnawi’s vision and ideology.

Barnawi’s appreciation of al-Qaeda was subtly evident in his August 3 interview with the Islamic State, when the group named him Boko Haram’s new wali. In it, Barnawi noted that after Mohammed Yusuf was killed, Boko Haram’s “soldiers were sent to the Greater Sahara to be trained there [by al-Qaeda], and transitioned from the stage of guerrilla warfare to the stage of empowerment and spreading control.” Thus, Barnawi likely still owes a debt to al-Qaeda for helping his father’s followers after Mohammed Yusuf’s death.

To win out over the Islamic State in Nigeria, all al-Qaeda has to do sit on the sidelines and watch Boko Haram fall apart, and patiently wait to capitalize. Boko Haram’s state opponents should watch for signs of such a realignment. Boko Haram’s reintegration into al-Qaeda’s network could give the Nigerian jihadist group an immediate boost by linking it to the growing Malian insurgency. It could also signal that the Islamic State no longer poses as much of a challenge to al-Qaeda’s global network, since Boko Haram has been the most prominent franchise that the Islamic State lured to its network. Losing Boko Haram would thus be a potent signal of the Islamic State’s decline.

Further, though the United States and its allies have found it notoriously difficult to capitalize on fissures within and among jihadist groups, the rivalries and maneuvering within Boko Haram demonstrate the strategic importance of internal dissension and realignment. Boko Haram’s defection to the Islamic State deprived it of al-Qaeda’s resources, which were more potent locally. And at this point disunity within Boko Haram is undeniable. Whether that makes Boko Haram less of a threat, or in the longer term creates greater dangers, remains to be seen. But scholars of sub-state violence should certainly be following developments in Nigeria to extract important lessons about disunity in militant groups.

Daveed Gartenstein-Ross is a Senior Fellow at the Foundation for Defense of Democracies and the Chief Executive Officer of Valens Global, a consulting firm that focuses on the challenges posed by violent non-state actors. Jacob Zenn is a Fellow of African Affairs at The Jamestown Foundation, a Senior Consultant at Valens Global, and an Adjunct Assistant Professor at Georgetown University, where he co-teaches a course on violent non-state actors with Gartenstein-Ross. Zenn also works on projects in countering violent extremism in Nigeria.