BEIRUT — Before the hostage crisis at a Malian hotel was over, before the gunmen had even been identified, admirers of al-Qaida and the rival Islamic State started jostling on social media over which of the jihadi organizations was more righteous and more prominent.
One apparent supporter of al-Qaida, whose Twitter profile suggested he could be a fighter in Syria affiliated with the group, quickly declared online that the Islamic State could "learn a thing or two" from the Mali attack, scornfully brushing off suggestions that the newer, upstart group had carried it out.
"Allahu alam" — God knows best — "they don't operate in #Mali," the post said. "We all know who operated there."
Exactly a week before Friday's siege in Bamako, Mali, the Islamic State — also known as ISIS or ISIL — shocked the world with attacks across Paris that killed 130 people. Militants linked to al-Qaida took credit for the hotel attack. And while the group cited local grievances as the rationale, it was also clear that the hostage-taking played into the growing and violent rivalry between the two groups.
Once united under the Qaida brand, they split over differing strategies in Syria. The Islamic State has since emerged as the most dynamic, popular force among radicalized Muslims, fueling a competition for recruits, cash and bragging rights among extremists who see bloodletting as the best way to advance an Islamist agenda.
That competition has led to lethal one-upmanship that will be difficult to stamp out, given innumerable soft targets, even if armies can weaken the groups in their bases in the Middle East and Africa.
The rivalry took a particularly vicious turn in Paris in January. Al-Qaida's Yemen affiliate claimed responsibility after gunmen slaughtered the staff of the satirical newspaper Charlie Hebdo — the most daring attack on the West in years by a group that had begun to be seen, in jihadi terms, as a bit graying and cautious compared with the social media-savvy Islamic State.
Some European analysts believe that Abdelhamid Abaaoud, the Islamic State operative who officials say orchestrated last week's Paris killings, saw the January attack as an urgent challenge to do something bigger.
Abaaoud is believed to have been entrusted with starting an Islamic State campaign of attacks in Europe, but his earliest attempts failed, including an attack on a Paris-bound train that was stopped when passengers overpowered the gunman. His mentor, Abu Muhammad al-Adnani, a senior leader of the group, appeared to increase the pressure, publicly taunting Muslims who failed to use any available means — "a bullet, a knife, a car, a rock" — to shed "crusader blood."
After months of trying, Abaaoud pulled off last week's attacks — which, in turn, some supporters of al-Qaida saw as something to be matched in fearsomeness and surpassed with what, in their view, was a more moral approach, taking care to limit the deaths of Muslim civilians.
The Mali gunmen weeded out Muslims by demanding that hostages recite verses from the Quran to be freed.
"Lions who carried out #MaliAttack separated Muslims from Christian in order2 protect the inviolable blood of Muslims," one supporter wrote on Twitter.
Another — calling himself Abu Sufian al-Libi, or the Libyan, on a Twitter profile that suggested he was fighting in Syria with al-Qaida's Nusra Front affiliate — responded enthusiastically.
"This is how Muslims SHOULD act!" he wrote, adding that the Islamic State "should learn a thing or two and drop their crooked creed and methodology," an apparent reference to the group's willingness to include Muslims in its slaughter of civilians. Muslims account for a majority of the Islamic State's victims in Iraq and Syria, and some of those killed in Paris last week.
Nearly a decade and a half ago, on Sept. 11, 2001, al-Qaida seized the world's attention with a uniquely spectacular act of terrorism, and it proceeded to harass the United States and its allies with attacks and insurgencies on multiple fronts around the globe. But in recent years, it has been eclipsed by the Islamic State, which dazzled jihadis by swiftly conquering wide stretches of territory in Syria and Iraq, creating what it calls a caliphate and erasing a decades-old colonial border.
"All the attention has been focused on the Islamic State, Iraq, Syria and threats to the West," said Richard Barrett, former head of global counterterrorism
operations at Britain's MI6 intelligence agency and now an analyst at the Soufan Group. "The guys in Mali saw a big opportunity to remind everyone that they are still relevant."
For both al-Qaida and the Islamic State, killing civilians has been a tactic and a strategy. But they have disagreed over just how bloody to be.
During the long insurgency against the U.S. occupation of Iraq, al-Qaida's leader there, Abu Musab al-Zarqawi, oversaw a bloody campaign of suicide bombings. The attacks targeted both the U.S. military and Iraqi civilians, including Muslims — and especially Shiites. The group saw Shiites as rivals for power in Iraq, but also as apostates who, under an extreme theology known as takfir, had betrayed Islam and deserved to die.
Al-Qaida's global leader, Ayman al-Zawahri, eventually called on the group's affiliates to avoid such wholesale killings, saying they tarnished the movement and hindered recruiting.
In Syria, the Nusra Front has sought partnerships with other insurgent groups that the Islamic State prefers to crush, and it has not carried out massacres with the scale or regularity of the Islamic State. (Not that Nusra has been a model of good governance in the areas it controls in Syria; it has killed opponents and driven out minorities as well.)
Their differences have been less over ultimate goals than over how to achieve them, and in what order. Al-Qaida has typically embedded itself in local movements and helped them fight while also planning attacks against the "far enemy" in the West. The Islamic State set out to establish and rule a caliphate, and to gain power from that claim of legitimacy.
In Syria, that put the two at odds. The Nusra Front made toppling President Bashar Assad its priority and sees the formation of a caliphate now as premature and a distraction.
Yet each has to some degree — perhaps as a result of competition, analysts say — adopted the other's tactics, with al-Qaida holding ground in some parts of Syria and Yemen and the Islamic State carrying out attacks in Paris, far from its base.
While many perceive them as mindlessly violent and nihilistic, members of both groups have, in their minds, a set of rationales for high-profile violence against civilians that they think will help them achieve their goals.
The approach is what Peter Neumann, a professor at King's College London and director of its International Center for the Study of Radicalization, called "the propaganda of the deed" — a kind of violence as performance that was also used by 19th-century anarchists.
The goal, he said, is "to inspire overreaction, inspiration and retaliation" — to provoke violence from governments that radicalizes more people and deepens the pool of recruits.
For al-Qaida and the Islamic State, that means fulfilling their vision of a clash with "crusaders" by provoking the West to lash out, letting the groups portray it as waging war on Muslims.
But there are other, more practical reasons for the attacks. They are a form of asymmetrical warfare, used against stronger opponents. And especially for the Islamic State, with its territorial ambitions, they are a way to ensure compliance from the conquered. Public beheadings, shootings or even crucifixions are ways to terrorize local populations in areas the group has taken over.
Where the Islamic State innovated the most was in carrying out increasingly gruesome violence explicitly to film it — to intimidate enemies and to draw recruits with eye-catching displays on social media.
It built on tactics al-Qaida had pioneered — like the on-camera beheadings of Daniel Pearl in Pakistan and, later, of other victims in Iraq. But it filmed them with Hollywood production values — for instance, clearly using sophisticated moviemaking equipment to record dozens of Egyptian Copts being slaughtered at sunset on a beach.
Those techniques have proved so effective in recruiting from a generation glued to cellphone videos that the Nusra Front and even other militant groups have begun to copy the high-quality, often melodramatic style of Islamic State videos.
The group has often issued such videos while suffering setbacks on the ground, as it has recently in Syria and Iraq, with nations intensifying their attacks.
"This sense of inevitable victory was going, and now, with the attack in Paris, people are super enthusiastic again," Neumann said of Islamic State chatter on social media. "Like they are on a winning team."
During and after the Mali attack, as supporters of the rival groups aired their differences, one tried to be conciliatory.
"I just wish we could all be brothers again& not argue," he wrote on Twitter.