A major attack on the Afghan Parliament may have been an attempt by the Taliban to demonstrate its dominance of the Afghan jihad against a rising threat from ISIS.

The boldness of the Taliban's attack on the Afghan Parliament on 22 June 2015, as well as the surge in recent attacks across the country (although fitting a pattern of increased Taliban activity during the month of Ramadan), can be read as an attempt to emphasise its relevance as the only jihadi movement in Afghanistan capable of victory, given the growing ideological and operational clout of ISIS in the country.

The ISIS 'province' of Khorasan, the creation of which was declared in January 2015, is based on the historic name for the predominantly Pashto region straddling Afghanistan and Pakistan. Thought to represent a diverse collection of jihadis who have pledged allegiance to ISIS leader Abu Bakr al-Baghdadi, rather than a monolithic franchise, the group's claim of responsibility for a bombing in Jalalabad in April 2015, which left 35 dead, represented the first ISIS-linked attack in South Asia.

ISIS and the Taliban have recently been trading blows, with reports of around 150 militants being killed and hundreds of families displaced during clashes in the eastern province of Nangaharm along the Afghanistan-Pakistan border. The two groups are also engaged in an escalating war of ideas. A recent open letter to Baghdadi written by the Taliban movement's deputy leader, urged ISIS to cease its operations in Afghanistan, indicating a serious concern on the part of the Taliban that its influence could diminish and that it may lose its fighters to the rival group. Indeed, many now fighting for ISIS in Afghanistan once fought for the Taliban.

A Competition of Religious Legitimacy

Despite a number of important differences between the groups' tactics, ISIS and the Taliban have one crucial feature in common; their competing claims of legitimacy are framed in almost exclusively religious language, while their criticisms of their rivals are primarily ideological.

The Taliban portrays itself as a more pious defender of Islam than its rival.

Taliban rhetoric and propaganda focuses on showing itself as a truer and more pious defender of Islam than its rival. The Taliban explicitly differentiates itself from ISIS by emphasising its adherence to Hanafi jurisprudence, one of the four orthodox Sunni schools, in line with the practice of the majority of Afghan Sunnis. Michael Semple, an expert on Taliban ideology and visiting professor at Queen's University Belfast, says that "Taliban opposition to ISIS rests on the movement's well-established position of rejecting Salafism as an alien deviation from Afghan clerical tradition."

The Taliban presents its fighters as continuing the legacy of martyrdom from previous Afghan conflicts, with the group's recent open letter to Baghdadi emphasing the deep historical roots of its current conflict against the Afghan state, including the "jihad against the British empire, Russian invasion, and current jihad against the Americans," an implicit attack on the relative youth of ISIS as a movement.

This rhetoric has permeated the Taliban's history, with its founding narrative portraying its members as the true mujahideen, in opposition to the chaotic, violent, and corrupt rule of the jihadis who overthrew the Soviets in the 1980s, and whom the Taliban presented as morally corrupt and thus compromising on Islamic purity.

ISIS' attacks on the Taliban follow a similar formula, as the group claims to be more pious and religiously pure than its competitor. In a recent issue of its propaganda magazine, Dabiq, a defector from al-Qaeda to ISIS criticises Taliban leader Mullah Omar for his "significant Sharia mistakes." The magazine also accuses the Taliban of failing to teach or follow tawhid (belief in the oneness of God). Amongst the group's "deviations" is its association with the Deobandi movement, and, indeed, its membership of the Hanafi school of jurisprudence. ISIS – together with most Salafi groups – holds itself above such things, regarding them as innovations of the faith that came after the time of the salaf (early generations of Muslims). ISIS holds that the consequences of such deviation include shirk (idolatry), manifested in practices the group attributes to the Taliban such as "circumambulating of graves" and "wearing of amulets." They also accuse the group of irja (in essence, not being restrictive enough in whom one defines as a Muslim), an accusation it also levels at rival jihadi groups in Syria.

ISIS seeks to show that the Taliban is religiously 'deviant.'

One of the particular threats that the Taliban poses to ISIS centres on rival claims over who leads the Muslim community. Mullah Muhammad Omar, the Taliban's leader, goes by the title emir al-momineen, or Commander of the Faithful. This is the historic title of caliphs, and as such is in direct contradiction to Abu Bakr al-Baghdadi's own claim to the title. For both organisations, the title forms a central part of the leaders' claims to religious legitimacy. So long as they hold the title, and meet the criteria to hold it (including being pious and highly educated Muslims, mentally and physically fit, and descended from the same clan as the Prophet Muhammad), they are largely unassailable within their respective movements.

However, ISIS' claim to the universal allegiance of all Muslims necessarily entails that there can be no Commander of the Faithful other than Baghdadi. Mullah Omar claims the title within the geographically limited Islamic Emirate of Afghanistan; Baghdadi claims it across the world. In order to discredit Mullah Omar, and to deny his right to the title (which he has held since 1996), ISIS has gone to great lengths to show that the Taliban are religiously 'deviant.'

This live battle of ideas is taking place within a context of renewed momentum within elements of the Taliban for negotiation with the Afghan government, with recent 'informal discussions' occurring in Qatar and Norway. However, this progress could mean little if rumours of increased factionalism within the Taliban movement are true. Such factionalism is both a symptom of the rise of ISIS in Afghanistan and, at least in part, its cause. The group's letter to Baghdadi accuses him of reintroducing divisions in the Afghan jihadi movement that the group had spent years trying to overcome. Two Taliban commanders have suggested that the group has been split into at least three different factions: those still broadly loyal to the Taliban, those who have pledged allegiance to ISIS, and those who wish to cease fighting and establish a peace deal with the Afghan government.

Given Monday's attack on the parliament, and the continuing rise in violence in the country, it seems that the widening fissures of jihadism in Afghanistan will result in increased violence in the country. As the two groups turn on each other and seek to prove that only one of them can secure 'true' Islamic governance in Afghanistan, civilians are likely to represent the lion's share of the casualties.