Kharijites
The seventh-century faction that declared judgment belongs to God alone, killed the caliph Ali, and invented the logic every modern jihadist group uses.

The Kharijites were the third faction to emerge from Islam's first civil war, after the Sunnis and the Shia, and they are the smallest of the three and by far the most influential per capita. Their founding argument was that a ruler who commits a grave sin ceases to be a Muslim and may be killed. That single proposition is the ancestor of the reasoning used by al-Qaeda and the Islamic State thirteen centuries later, which is why mainstream Muslim scholars condemning those groups almost always call them Khawarij. It is the oldest insult in Islamic political vocabulary and it is a precise one.
Walking out
The name means those who go out, and it describes a specific walkout. In 657 the caliph Ali fought Muawiya, the governor of Syria, at Siffin on the Euphrates. Ali was winning when Muawiya's men raised pages of the Quran on their spears and called for arbitration. Ali's soldiers refused to keep fighting against the Book, and he accepted arbitration against his own judgment.
A large bloc of his most committed followers were appalled. Their position was that the question of who should lead the community had already been answered by God and could not be submitted to human negotiators. Their slogan was la hukma illa lillah, judgment belongs to God alone. They left Ali's camp, encamped separately, and declared both Ali and Muawiya illegitimate.
Ali destroyed most of them at Nahrawan in 658. It made no difference. In January 661 a Kharijite named Ibn Muljam struck Ali with a poisoned sword in the mosque at Kufa, and the fourth caliph, the man Shia Muslims regard as the rightful successor to the Prophet, died at the hands of former supporters who had decided he was an apostate.
The doctrine and its cost
Stripped down, Kharijite thought had three moves.
The first was moral rigorism: faith is proved by action, so a Muslim who sins gravely is not a backsliding Muslim but an unbeliever. The second was takfir, the practice of declaring another Muslim an unbeliever, which matters enormously because the blood of an unbeliever in a state of war is not protected the way a Muslim's is. The third was radical egalitarianism about leadership: the caliph need not be of Quraysh, need not be an Arab, could be any pious Muslim including, in some Kharijite groups, a freed slave, and could be deposed or killed the moment he failed.
That last position is genuinely attractive and explains their appeal on the empire's margins. In Umayyad Iraq and North Africa, where non-Arab Muslims were taxed and excluded, a doctrine that made piety the only qualification for rule drew real support. Kharijite rebellions were a chronic drain on the Umayyad state and contributed to its fall.
The cost was that the logic ate itself. If sin equals unbelief, and unbelievers may be killed, then every disagreement about what counts as sin becomes a capital matter. The most extreme faction, the Azariqa, held that Muslims who did not join them were unbelievers whose women and children could be killed. Kharijite groups splintered and slaughtered each other, and the movement burned out as a political force by the ninth century.
What survived
One moderate branch survived and deserves mention, because it complicates the caricature. The Ibadis, who broke from the militant Kharijites early and rejected the killing of other Muslims, are the majority in Oman today and exist in pockets of Algeria, Libya, and Zanzibar. Oman's careful, mediating foreign policy, its refusal to take sides between Iran and Saudi Arabia, and its willingness to host talks nobody else can host, comes out of a religious tradition that spent centuries learning to coexist as a minority.
The other survival is the argument. When Islamic State theorists justify killing Shia Muslims, Sunni officials, or other jihadists, the chain of reasoning runs directly through takfir: identify the target as an unbeliever, and the prohibition on killing Muslims no longer applies. When al-Azhar and other scholarly bodies respond, they do not merely say the violence is wrong. They say it is Kharijism, a heresy the community identified and rejected in the first century of Islam.
Both sides in that exchange know exactly what they are arguing about. It is the same fight that emptied Ali's camp at Siffin.