Afghanistan’s 16-year war has largely been fought between the Taliban and a regime in Kabul backed by the US and Nato forces. The battle between the two was understood to be political, not sectarian. The Taliban considered a war between Muslims counterproductive to establishing an Islamic emirate. However the bombing of a Shia cultural centre in Kabul by Isis’s Afghan arm marks a new low of vicious identity violence.

The blast took place in a part of west Kabul that is home to large numbers of Hazara, a largely Shia minority. Hazaras had been sidelined for generations and lived in fear of being massacred by the majority Pashtuns. However, the US invasion of Afghanistan in 2001 changed their fate. Hazaras now routinely top university admissions examinations, and within a decade almost half of the community’s girl students were passing university exams. Hazaras do not have political power but they are rising.

Isis’s franchise in Afghanistan, like its parent in Iraq, appears to play on fears that Shias will remake their circumstances and upend traditional hierarchies. The group’s first attack, and its deadliest, in the Afghan capital last year was on a rally by Hazaras demanding that electricity transmission be routed through their heartland. Last November Isis beheaded several Hazaras, including a girl of nine, causing widescale panic. Isis justifies its bruality by claiming it is combatting an Iranian expansionist project – a fear stirred by returning Shias recruited by Tehran to fight Isis in Syria.

The Taliban is rooted not just in Sunni revivalism but also in Pashtun nationalism. In this part of the world, once a group – be it defined by ethnicity or creed – acquires the status of a nation it can become intolerant of all others. Hence the need to find a space for all identities. In Iraq the key paradox was that “identity politics” became the American strategy for influence and control over that country, but it also contributed to shaping the identity of Isis on sectarian lines. Afghanistan’s government, weakened by a grinding war, is making similar mistakes and is vulnerable to polarising forces. Isis thrives on discord. Its ability to turn latent divisions into bloody slaughter should not be underestimated.