Ali defeated the Kharijites at the Battle of Nahrawan, but that was not the end of the Kharijites. Because of the reverse met at Nahrawan they became all the more fanatic. Those who survived the disaster of Nahrawan burnt with the desire to seek vengeance for the blood of their comrades who had fallen in the Battle of Nahrawan.
After the Battle of Nahrawan, many Kharijites went to Makkah and sought sanctuary in the Kaaba. At Makkah they saw that the occupation of the city by the Syrians, the people repudiated their oath of allegiance to Ali, and transferred their allegiance to Muawiyah, later they saw that when the Syrians were driven away from Hijaz, the people of Makkah recanted from their oath of allegiance to Muawiyah, and took the oath of allegiance to Ali again. The Kharijites felt sore that in this way the sanctity of the process of oath taking was violated, and instead of establishing the kingdom of God on earth, the parties were trying to establish their own kingdoms. That was revolting to the way of thinking of the Kharijites. According to their view all those who were fighting for power had committed sin and had ceased to be Muslims. Fanatics as they were, they had the conviction that they would be serving the cause of God, if they murdered all such persons who were the principal characters in the struggle for power. They singled out three men for such murder: Ali, Muawiyah and 'Amr b Al-A'as.
The Kharijites in Makkah met at the Kaaba, and commissioned three young men to carry the plot of murder into effect. Abdur Rahman b Maljam al Sarimi was chosen to assassinate Ali at Kufa. Barq b Abdullah was entrusted with the task of murdering Muawiyah. Amr b Bakr was assigned the task of putting an end to 'Amr b Al-A as at Fustat. These young men whitened their swords with deadly poison. Thereafter they were required to proceed to the places assigned to them, and there wait till the seventeenth of the month of the Ramadan, when all the three assassins were to fall on their victims and kill them.