On Feb. 9, a video attributed to Ansaru, an insurgency and terrorist organization based in Nigeria, was posted on YouTube. Much of the 18 minute production focuses on the destruction allegedly wrought by government forces as they hunt down the jihadists. One grisly scene shows what appears to be a soldier sawing at the neck of a Muslim citizen before dumping his victim’s body in an unmarked grave. Other scenes purportedly show Christians burning Muslims alive and the charred remnants of villages ransacked by the Nigerian army.

Against this backdrop, the video’s director argues, the Muslims of Nigeria have no choice but to join or support Ansaru. “Jihad has become inevitable,” an Ansaru narrator says in Hausa, according to a translation obtained by The Long War Journal. “Inactiveness can no longer help. God has brought a solution to your problem, and that solution is Ansaru. Its role is to enlighten and wage jihad in the cause of God. It is also to protect Muslims’ lives and property.”

The Ansaru speaker then shifts his attention from the Nigerian army, the main villain of the production, to another foe: the jihadist group commonly referred to as Boko Haram. Ansaru’s jihad “is different from Boko Haram[‘s],” which “launches physical and bomb attacks at Muslims and public places such as mosques, markets, and motor parks,” the speaker says. “These acts are contrary to the teachings of Islam. In fact, jihad is prescribed to assist the wounded.”

To underscore Ansaru’s denunciation, the video shows Abu Bakr Shekau, Boko Haram’s emir, grabbing his crotch in an undignified manner. Not that Shekau has ever been accused of being dignified.

(A screen shot of the scene can be seen on the right.)

And with that, Ansaru once again seeks to distance itself from Shekau and Boko Haram. Ansaru has long been critical of Shekau and his fighters, even as the two sides have conspired to terrorize northern Nigeria. But in recent weeks Ansaru’s messages have become more frequent, and so have its verbal attacks on Boko Haram.

There are multiple indications that Ansaru is aligned with al Qaeda and is adopting the guidelines for waging jihad issued by al Qaeda’s senior leadership. The group is attempting to portray itself as the true defender of local Muslims against various conspiracies, just as al Qaeda groups have elsewhere around the globe.

Meanwhile, it is likely that Shekau’s Boko Haram has been cooperating with the Islamic State, al Qaeda’s rival, at least when it comes to its propaganda operations. And, according to some reports, Boko Haram is even considering swearing allegiance to Abu Bakr al Baghdadi, the Islamic State’s self-proclaimed “Caliph.” However, according to the most recent information, no decision in that regard has yet been made.

Islamic State media team assisting Boko Haram

Unlike many other jihadist groups, Boko Haram has not maintained an active presence on social media. That changed earlier this year when a Twitter account claiming to represent the organization first appeared online. Suspiciously, the account was promoted by Twitter users known to disseminate the Islamic State’s propaganda.

One of the Islamic State feeds that advertised Boko Haram’s new Twitter account was maintained by a jihadist known as Shaybah al Hamad, whose account (@shaiba_ha) has since been suspended. In his own tweets, Hamad claimed to be in contact with Boko Haram’s leadership.

Boko Haram’s propaganda has never been top-notch, but jihadists who closely followed Hamad’s account noticed an improvement in its releases, which seemed to borrow some of the Islamic State’s characteristics. Videos and images released this year have focused on Boko Haram’s acquisition of territory, used multiple languages, and are generally branded in a more sophisticated manner.

Shekau, who is known for ridiculous performances, was also more composed in a video released earlier this month. That video, which was far more polished than Boko Haram’s or Ansaru’s typical releases, is entitled, “A message to the Leaders of Disbelievers.” Shekau, who is shown sitting, denounced Western democracy, threatened the coming Nigerian presidential election, and defended Boko Haram in the one-man show.

An image of Shekau from the video can be seen at the beginning of this article.

US counterterrorism and intelligence officials are aware of the contacts between Boko Haram and the Islamic State. As The Daily Beastfirst reported, National Counterterrorism Center (NCTC) Director Nicholas Rasmussen told the Senate Intelligence Committee earlier this month that there has been an “increased intercommunication between Boko Haram and other terrorist groups in the northern part of, the northwestern part of Africa, and even with ISIL [the Islamic State].”

Those “other terrorist groups” include those belonging to al Qaeda’s international network. But the relationship between Boko Haram and the Islamic State has raised red flags, especially because Boko Haram is reportedly entertaining a more formal alliance.

According to the SITE Intelligence Group, Afriqiyah Media, which disseminates jihadist propaganda, distributed a “collection” of “old messages” from “Jama’at Ahl al-Sunnah Lil Dawa Wal Jihad” (Boko Haram) to Muslims. The messages were released via Afriqiyah Media’s Twitter account on Feb. 22. One statement in the collection is particularly noteworthy.

“We give you glad tidings that the group’s Shurah Council is at the stage of consulting and studying, and we will let you know soon the group’s decision in respect to pledging allegiance to the Caliph of the Muslims Abu Bakr al-Baghdadi, may Allah preserve him,” a Feb. 9 message from Boko Haram reads, according to SITE. The statement continues: “Deliver our greetings to all of our mujahideen brothers, especially the mujahideen of the Islamic State, and deliver our message to all the Muslims, that your brothers in Nigeria are calling you to immigrate to us, to assist us in managing the areas in which we have control and fight the alliance of the disbelievers.”

There is another sign that Boko Haram may be positioning itself for a more firm relationship with its infamous jihadist counterparts in Iraq and Syria. The organization has been using the “Islamic State in West Africa” as its name in some of its releases, making its desire to rule as an emirate explicit.

It is likely that the Islamic State has sent representatives to Nigeria and Abu Bakr al Baghdadi’s emissaries are currently negotiating the terms of their proposal for a more formal relationship with Boko Haram, according to US officials contacted by The Long War Journal.

As of this writing, it is not clear if Shekau and Boko Haram’s shura council have decided to accept or reject the deal. It is also not clear if the proposed alliance, should it come to fruition, encompasses all of Boko Haram or factions within the group. The Islamic State has hinted at an oath of allegiance coming from Nigeria, but has not identified the jihadists involved.

Al Qaeda in Nigeria

Al Qaeda has long had Nigeria in its sights and has supported the jihadists there in multiple ways. This support has flowed primarily through al Qaeda’s official branches, especially al Qaeda in the Islamic Maghreb (AQIM). But Shabaab in Somalia and al Qaeda in the Arabian Peninsula (AQAP) have worked with both Ansaru and Boko Haram as well, according to the US government, the United Nations, and other foreign officials.

Multiple jihadist factions have vied for influence, however, with some being closer to al Qaeda than others. One of Ansaru’s fallen leaders was even in direct contact with al Qaeda head Ayman al Zawahiri, according to one member of the group.

Perhaps the most comprehensive discussion of Ansaru and Boko Haram, which have frequently colluded against their common enemies despite their different approaches to waging jihad, can be found in a report published by the International Crisis Group (ICG) in 2014. According to the ICG, Ansaru was formed by Boko Haram members who “fled to Somalia and Mali, where they joined and trained with [Shabaab] and AQIM respectively,” in 2009.

Two Ansaru leaders, Abubakar Adam Kambar and Khalid Barnawi, were “close” allies of Boko Haram leader Mohammed Yusuf, who died while in the custody of authorities in 2009. The ICG cites reports indicating that Yusuf “received funds” from Osama bin Laden and other “external Salafi contacts” that “he used to fund a micro-credit scheme for his followers and [to] give welfare, food and shelter to refugees and unemployed youth.”

Both Kambar and Barnawi “reportedly trained in an AQIM camp in the Algerian desert and forged a close alliance with the group.” The training “gave them more sophisticated skills and a global jihadi orientation,” though they “disapproved of Boko Haram’s indiscriminate attacks, preferring high-profile killings and targeting Western interests.”

The ICG states that Ansaru became Nigeria’s al Qaeda “franchise,” with Kambar as its leader. One Ansaru member cited in the ICG’s report said that Kambar had “communicated directly with” Ayman al Zawahiri.

Kambar was killed in 2012, however, and Barnawi (also known as Abu Usama al Ansari) then assumed the number one position. Barnawi has cooperated with both AQIM and Boko Haram in orchestrating kidnappings that resulted in lucrative ransoms. How to divide some of this ransom money caused conflicts within Boko Haram. AQIM also refused to help Ansaru with one hostage-taking operation because it wasn’t approved by the al Qaeda branch first.

Still, because of his “close links” to AQIM, Barnawi is its “channel for the supply of funds and weapons to both Ansaru and Boko Haram.” And despite their differences, Shekau and Barnawi reached an accommodation at one point, with Shekau naming “Babagana Assalafi, Barnawi’s closest disciple, his deputy.” Assalafi was subsequently killed in a raid by the Nigerian army.

Shekau’s open praise for al Qaeda’s leaders, including Osama bin Laden, also seems to have signaled closer cooperation between Ansaru and Boko Haram in 2012, according to the ICG.

Multiple other official reports say that al Qaeda’s network has been backing both Ansaru and Boko Haram.

The US government has recognized the ties between Boko Haram, Ansaru and al Qaeda’s network on multiple occasions. In 2012, the State Department designated Shekau, Kambar, and Barnawi as terrorists. The Ansaru leaders, Kambar and Barnawi, “have ties to Boko Haram and have close links to” AQIM, Foggy Bottom noted.

And when the State Department offered a $7 million reward for information leading to Shekau’s capture in 2013, the US government explicitly recognized the ties between Boko Haram and three established al Qaeda branches. There “are reported communications, training, and weapons links between Boko Haram, al Qaida in the Lands of the Islamic Maghreb (AQIM), al Shabaab, and al Qaeda in the Arabian Peninsula, which may strengthen Boko Haram’s capacity to conduct terrorist attacks.”

Ties between al Qaeda’s senior leadership in Pakistan and Boko Haram were found in Osama bin Laden’s documents, which were recovered by Navy Seals during the raid that killed the al Qaeda chieftain in May 2011. The Washington Post’s intelligence sources have said that the al Qaeda CEO “was in touch not only with al Qaeda’s established affiliates but also with upstarts being groomed for new alliances,” including Boko Haram. Likewise, the Guardian (UK) has reported that bin Laden’s files show contacts between the Nigerian group and al Qaeda’s senior leaders.

Finally, in the summer of 2013, US intelligence officials discovered that Boko Haram was represented on a “conference call” between Ayman al Zawahiri and more than 20 of his subordinates around the globe. Zawahiri announced that Nasir al Wuhayshi, who leads AQAP, had been named as al Qaeda’s global general manager. The discovery of the communication led the US to shutter more than 20 diplomatic facilities around the globe, as the jihadists discussed targeting US interests.

Islamic State-al Qaeda rivalry spreads to Nigeria?

Should Boko Haram, or factions within the group, ally with the Islamic State, it will be the next step, and perhaps the most significant, in a long-running dispute between Ansaru and Shekau’s fighters.

Ansaru’s denunciations of Boko Haram have become more frequent in recent weeks, but the group’s leaders haven’t hidden their objections to Boko Haram’s indiscriminate violence in the past either. Ansaru has even accused Shekau of uttering “delusional phrases.”

In May 2013, Ansaru said that it was not responsible for the killings of Nigerian civilians, saying that such slayings were the work of “the soldiers of Satan and those who don’t know the Sharia policies and the goals of the Sharia,” meaning Boko Haram.

In November 2013, according to SITE, Ansaru leader Barnawi released a speech in which he argued that the threats to Nigeria’s Muslims come from three sources: Christians, the Nigerian government, and the “people from their own group making them taste the same thing that they suffer from the cruel enemy.” The last “group” is a reference to Boko Haram.

Ansaru returns to this theme in its most recent videos. In addition to the production released on Feb. 9, an Ansaru fighter denounced Boko Haram in a video released via Twitter on Jan. 29. The Ansaru speaker said that his organization does not “kill any Muslim nor attack the Muslims in the places of their day to day affairs” like Boko Haram does, according to SITE’s translation. “We only wage jihad to help the weak Muslims that are being oppressed.”

This same disagreement over how to employ violence first led to divisions between the jihadists in Syria, where the Islamic State’s quest to build a “caliphate” led to vicious infighting between Abu Bakr al Baghdadi’s men and the Al Nusrah Front, al Qaeda’s official branch in Syria, as well as other jihadists. The Al Nusrah Front also argues that it is simply defending Muslims.

To date, Ansaru and Boko Haram have avoided all out war against each other. That may change if Boko Haram, which has more fighters than Ansaru, is drawn closer to the Islamic State. Ansaru will almost certainly remain loyal to al Qaeda. Barnawi openly refers to Ayman al Zawahiri as “our emir” and Mullah Omar, the head of the Taliban, as the “Emir of the Believers” — a title Abu Bakr al Baghdadi claims for himself.

Thomas Joscelyn is a Senior Fellow at the Foundation for Defense of Democracies and the Senior Editor for FDD's Long War Journal.