After the unsatisfactory conclusion to the Battle of Siffin, Imam Ali (A.S.) returned with his army back to Kufa on the 13th of Safar 37 A.H. During the march, a group of 12,000 men kept themselves at a distance from the main part of the army.
The group was furious at the way things had ended at Siffin. These were the Kharjites (Kharjite means one who rebels against religion). They were the same people who had put down their weapons on the battlefield. Now they said that Imam Ali (A.S.) had betrayed Islam by agreeing to the truce and should have referred judgment to the Holy Qur'an alone or continued to fight. They demanded that he repent for this great sin.
When the army neared Kufa, the Kharjites camped at a village named Harura. They started saying that all Muslims were equal and nobody could rule over the other. In this way, they denounced both Imam Ali (A.S.) and Muawiya and said that their belief was in "La Hukma Illa Lillah", meaning, "No Ruler ship except by Allah alone."
Imam Ali (A.S.) sent Sasaa Bin Sauhan and Ziad Bin Nazr Harisi in the company of Ibne Abbas towards them and afterwards himself went to the place of their stay and tried to explain to them that they were misunderstanding the words "La Hukma Illa Lillah", and that in accepting the arbitration (peace talks) at Siffin, he had not gone against the teachings of the Holy Qur'an.
He pointed out that they themselves were at fault, because they should never have laid down their arms and forced him to call back Malike Ashtar, who was at the point of securing victory. He reminded them that they had pressed for the arbitration and had forced him to appoint Abu Musa Ash'ari as their representative. He told them that he found their present behavior very strange, considering their involvement in Siffin. To this they admitted that they had sinned but now they had repented for it and he should do the same.
Imam Ali (A.S.) replied that he was a true believer and did not have to repent because he had not committed any sin and dispersed them after discussion.
The Kharjites refused to accept the words of Imam Ali (A.S.) and awaited the decision of Amr al-Aas and Abu Musa Ash'ari. When they learnt of the decision they decided to revolt, and they set up their headquarters at Nahrawan, twelve miles from Baghdad. Some people came from Basra to join the rebels.
On the other side, after hearing the verdict of Arbitration Imam Ali (A.S.) rose for fighting the army of Syria and wrote to the Kharijites that the verdict passed by the two arbitrators in pursuance of their heart's wishes instead of the Qur'an and sunnah was not acceptable to him, that he had therefore decided to fight with them and they should support him for crushing the enemy. But the Kharijites gave him this reply, "When you had agreed to Arbitration in our view you had turned heretic. Now if you admit your heresy and offer repentance we will think over this matter and decide what we should do." Imam Ali (A.S.) understood from their reply that their disobedience and misguidance had become very serious. To entertain any kind of hope from them now was futile. Consequently, ignoring them he encamped in the valley of an-Nukhaylah with a view to marching towards Syria to fight against Muawiya.
Imam Ali (A.S.) had already started towards Muawiya when he received the news that they had butchered the governor of Nahrawan namely Abdullah Ibn Khabbab Ibn al-Aratt and his slave maid with the child in her womb, and have killed three women of Banu Tayyi and Umm Sinan as-Saydawiyyah. Imam Ali (A.S.) sent al-Harith Ibn Murrah al-Abdi for investigation but he too was killed by them. When their rebellion reached this stage it was necessary to deal with them. There was a danger that the Kharjites might attack Kufa while Imam Ali (A.S.) and his men were marching towards Muawiya, so Imam Ali (A.S.) decided to stop them. He changed his course eastward, crossed the river Tigris and approached Nahrawan.
On reaching there Imam Ali (A.S.) sent a messenger to the Kharjites demanding that those people who had murdered innocent Muslims around their camp should be surrendered. The Kharjites replied that they were all equally responsible for killing these sinners.
There was some reluctance in the army of Imam Ali (A.S.) to fight the Kharjites, because they had been their companions against Muawiya at Siffin. Imam Ali (A.S.) himself did not desire the bloodshed of these misguided fanatics, so he sent Abu Ayyub al-Ansari with a message of peace. So he spoke to them aloud, "Whoever comes under this banner or separates from that party and goes to Kufah or al-Mada'in would get amnesty and he would not be questioned. As a result of this Farwah Ibn Nawfal al-Ashja'i said that he did not know why they were at war with Imam Ali (A.S.). Saying this he separated along with five hundred men. Similarly group after group began to separate and some of them joined Imam Ali (A.S.). In the end, only cores of 1,800 die-hards were left under the command of Abdallah bin Wahab. These Kharjites swore that they would fight Imam Ali (A.S.) at any cost.
Nahjul Balagha - Sermon 36/Warning the people of Nahrawan of their fate:
"I am warning you that you will be killed on the bend of this canal and on the level of this low area while you will have no clear excuse before Allah nor any open authority with you. You have come out of your houses and then divine decree entangled you. I had advised you against this arbitration but you rejected my advice like adversaries and opponents till I turned my ideas in the direction of your wishes. You are a group whose heads are devoid of wit and intelligence. May you have no father! (Allah's woe be to you!) I have not put you in any calamity nor wished you harm."
The Kharjites attacked Imam Ali's (A.S.) army with desperate courage. However, they did not stand a chance against the superior army that faced them and they were all killed except nine men. These nine managed to flee to Basra and elsewhere, where they spread the fire of their hatred and recruited more followers. From Imam Ali's (A.S.) army only eight persons fell as martyrs. The battle took place on the 9th Safar, 38 A.H. Two years later, in 40 A.H., it was the Kharjites who sent out three assassins to kill Imam Ali (A.S.), Muawiya and Amr al-Aas. The latter two survived but Imam Ali (A.S.) was martyred following Ibne Muljam's cowardly attack in the mosque of Kufa.
Having disposed of the Kharjites at Nahrawan, Imam Ali (A.S.) resumed his march to Syria. However, the chiefs of his followers urged him to stop at Kufa to let the men rest before the long journey and to enable the army to repair their weapons and armours. Imam Ali (A.S.) agreed to this request and camped at Nukhayla outside Kufa. The soldiers were allowed to leave the camp for a day.
On the next day, hardly any men returned and at length, Imam Ali (A.S.) entered Kufa and gave a stern sermon to the people. However, nobody came forward and finally, Imam Ali (A.S.) turned away from them in disappointment. The Syrian expedition was abandoned, never to be resumed.