Imam Ali, the son-in-law and cousin of the Prophet Muhammad, during his rule as the Caliph and Imam granted full freedom to Kharijites or Khawarij in Arabic language – a general term embracing Muslims who initially supported the authority of the Imam and Caliph Ali ibn Abi Talib and later rejected his leadership.
Kharijites did not accept Hazrat Ali (A.S) as their Imam in congregational prayers as they deemed him as a pagan. They went to the mosque, did not say prayers with Hazrat Ali, and most likely annoyed him. Once the people were standing behind Imam Ali (A.S) as the Imam of congregational prayers, one of the Kharijites named Ibn al-Kwa loudly recited a Qur’anic verse rebuking Imam Ali (A.S).
The verse addressing Prophet Muhammad (peace be upon him), says, “You and the prophets preceding you have been told by God that if you become pagan, your deeds will be deemed as void and you will be hurt.”
Ibn al-Kwa intended to implicitly tell Imam Ali (A.S), “We know your records and activities for Islam. First of all, you are a Muslim and Prophet Muhammad has selected you as a brother. You made a great sacrifice in Laylatul Mabit, when you slept in Prophet’s bed and endangered your life. The services you have rendered to Islam are undeniable. But, God has told His prophets that their deeds will be deemed as null and void if they become pagan. And you spoiled your deeds because you became a pagan.”
What was Ali’s reaction? He stopped praying as he heard the recitation of the Qur’anic verse. As the recitation ended, Ali resumed his prayers. Ibn al-Kwa repeated the verse and Ali again remained silent because the Holy Qur’an has ordered, “Keep silent and listen when the Qur’anic verses are recited.”
For this reason, when the imam of congregational prayers is reciting, the worshippers should be silent and listen.
After Ibn al-Kwa repeated the verse several times and intended to disturb the prayers, Ali recited the following verse: “Wait. God’s promise is right and will be fulfilled. Impious people cannot make any change in your behavior and humiliate you.” Then Imam Ali (A.S) did not pay any attention to him anymore and kept saying his prayers.
source : tebyan