'Ali acted towards the Khawarij with the utmost degree of liberality and democracy. He was the caliph and they were his subjects; every kind of punitive action was within his power, but he did not put them into prison, neither did he flog them; he did not even cut off their quota from the treasury (baitu 'l-mal). He looked upon them in the same way as upon other individuals. This matter is no exception in the history of 'Ali's life, but it is something of which there are few examples in the world. Everywhere they were free to express their opinions, and 'Ali and his companions freely opposed them with their own opinions and spoke to them. The two sides put forth their reasoning, and countered their opponent's reasoning.
Maybe such a degree of freedom is without precedent in the world, in which a government acts towards its opponents with such a degree of democracy. They came into the mosques and disrupted 'Ali's speeches and sermons. One day, 'Ali was speaking from the minbar when a man came forward and asked a question, and 'Ali gave an impromptu answer. A Khawarij who was among the people called out: "May God kill this man; what a knowledgeable man he is!" The others wanted to hold him back, but 'Ali ordered them to release him, saying: "It was only me he insulted."
The Khawarij would not pray behind 'Ali in communal prayers because they considered him a disbeliever, but they went to the mosque and refused to let `Ali alone, sometimes molesting him. One day, 'Ali had stood up to pray and the people had stoop up behind him, when one of the Khawarij whose name was Ibn al-Kawwa' shouted out, and read a verse from the Qur'an in allusion to 'Ali:
This verse was addressed to the Prophet:
And indeed it has been revealed to thee and to those (prophets) before thee, "If thou associatest (other gods with Allah), thy work shall surely fail and thou wilt be among the losers." (az-Zumar, 39:65 )
Ibn al-Kawwa' wanted to insinuate about `Ali by reciting this verse that: "Yes, we know your past history in Islam! First you were a believer, the Prophet chose you as a brother, your selflessness shone out on the night of the Prophet's escape from Mecca (laylatu 'l-mabit) when you slept in the place of the Prophet in his bed, you put yourself forward as a lure for swords. Truly your service for Islam cannot be denied. But God also said to His Prophet: `If you associate (others with God) your work will come to naught.' Now that you have become a disbeliever you have cancelled out your past deeds."
What could `Ali do, faced with this, with this man's voice shouting out the Qur'an? He remained silent until the man reached the end of the verse; and when he finished, 'Ali continued with the prayer. Then Ibn al-Kawwa' repeated the verse, and meanwhile `Ali fell silent again. He kept silent because it is a Qur'anic command that:
And when the Qur'an is recited, give you ear to it and be silent. (al-A'raf, 7:204)
And this is the proof for the fact that when the prayer leader is reciting the Qur'an, believers must be silent and listen.
After he had repeated the verse several times, wanting to disrupt the prayer, 'Ali recited this verse:
So be thou patient: surely Allah's promise is true; and let not those who have not sure faith make thee unsteady. (ar-Rum, 30:60)
Then he paid no more attention and continued with his prayer. 
In the beginning, the Khawarij were peaceable, and contented themselves with merely criticising and speaking openly. `Ali's behaviour with them was also just as we noted before, namely, he never caused them any trouble, not even cutting off their wages from the treasury (baitu 'l-mal). However, as they began to despair of 'Ali ever repenting, their activities gradually changed. They decided to bring about a revolution, so they gathered in the house of one of their brethren, who gave an aggressive and provocative speech in which he invited his friends to rise up in the name of "bidding to good and forbidding evil." He said (after praise to God)
I swear by God that it is not worthy of a group which has faith in a Merciful God and which adheres to the command of the Qur'an that the world should seem dearer to them than "bidding to good and forbidding evil" and speaking the truth, even though these (activities) may bring loss and involve danger; for everyone who incurs loss and danger in this world will be rewarded on the Day of the Resurrection with the felicity of God and the eternity of Paradise. O brothers! Le us go out from this city where injustice dwells (and go) to mountainous places or some other towns so that we can take a stand against these misguided innovations and put a stop to them.
With this morale-raising and fiery speech, they became even more fiery and went out form that place to try to bring about an uprising and a revolution. They threatened the security of the highways and took to marauding and sedition. Their aim was to weaken the government by this means, and to bring down the then existent rule.
Now it was no longer the time to leave them at liberty, for it was not a matter of the expression of beliefs, but of sabotage against public security and an armed uprising against the legal government. Thus 'Ali pursued them and met them face to face on the banks of the Nahrawan. He made a speech in which he advised them and gave them an incontrovertible proof. Then he put the flag of true faith into the hands of Abu Ayyub al-Ansari as a sign that everyone who gathered round it was a true believer. Out of twelve thousand men, eight thousand turned back from Khawarijism while the remainder showed their obstinacy. They were severely beaten, and apart from a very small band none remained.
. Sharh, Ibn Abi 'l-Hadid, vol.6, p.311.