Let there arise out of you a band of people inviting to all that is good, enjoining what is right, and forbidding what is wrong: They are the ones to attain felicity.
Be not like those who are divided amongst themselves and fall into disputations after receiving Clear Signs: For them is a dreadful penalty,
Basic purpose of the establishment of the Islamic caliphate
This is the commandment to the Muslim community to establish a system that is essentially based on holding fast to Allah’s rope or covenant and is a necessary prerequisite to help people to abide by its demands. For this purpose, the Muslims are instructed to appoint a group from among them to enjoin ma‘rūf or good, or the noble conventions of society, and to forbid munkar or evil as defined by the Islamic Sharī‘ah. The way the imperatives − enjoining and forbidding − are used concerning good and evil clearly indicates that this task is to be carried out not by mere verbal advice and admonition, but must also be enforced by law and authority. This is impossible without political power vested in such a group on behalf of the Muslim community. If the purpose were to accomplish the task of enjoining good and forbidding evil by advice and propagation of da‘wah only, the words yad‘ūna ila-l khayr (inviting to good) should have sufficed and there was no need to add ya‘murūna bi-l ma‘rūf (enjoining or commanding what is right). In our view, this verse proves that the establishment of the Islamic khilāfah or Islamic political system, is obligatory and incumbent upon Muslims. It was indeed in compliance with this Divine commandment that the first thing that the Muslims attended to was the establishment of a caliphate on the pattern of the Prophet’s model of governance. The primary purpose of this institution was to monitor and stand guard so that there should be no deviation from the ideal of i‘tiṣām billāh or holding fast to Allah. In terms of principles, it adopted three methods in order to realise this goal: inviting people to good, enjoining what is right and just and forbidding what is wrong and evil. Out of these three sprang all other departments during the rightly guided caliphate. These were used as a means of meeting all the internal and external responsibilities of the Muslim ummah.
Wa ūla’ika humu-l mufliḥūn (such are the ones who shall prosper) These words do not specifically refer to the group charged with this task but to the Muslim community as a whole. In other words, it means that a community that maintains such measures to hold fast to Allah − i‘tiṣām billāh − will alone prosper in this life as well as in the life to come. Next, the Muslims are warned by citing to them the example of the Jews and the Christians. Despite clear warnings, they had abandoned Allah’s rope and were left groping in the dark and grasping at whatever came to their hands. Consequently, there arose among them insurmountable differences, splitting them apart into various sects. Let the Muslims take heed and avoid such dire consequences in the life of this world and the hereafter. They are warned against following in the footsteps of the Christians and the Jews, since this is not the path to success and fulfilment, but is sure to lead to disaster and a most grievous torment.
Islahi, Amin Ahsan. Pondering Over The Qur’an: Surah Ali Imran (pp. 207-209). Islamic Book Trust. Kindle Edition.