From our perspective, the formation of the government of the Prophet (s) was in reality a divine matter. Furthermore, the matter of governance permeates into every aspect of human life. Imam Baqir (a) is narrated to have said: (...وَ لَمْ یُنَادَ بِشَیْءٍ کَمَا نُودِیَ بِالْوَلَایَة)[i] which means that no one has invited others to something as important as that of Wilayah. Therefore, it is governance which gives meaning to everything else.
The goal of the prophets (a) was not a worldly goal. The Prophet’s (s) intent in the formation of a government was not in seeking power or wealth. The Prophet (s) was after the building up of human beings, and in the same way, a divinely legislated government is after these same goals. The existence of the Prophet (s) found continuation on the blessed day of Ghadeer in the system of the Imamate. The Imamate began with Imam Ali (a) and then continued with the rest of the Imams (a).
In our belief system, the system of religious governance is accepted as a definitive foundational matter. This belief is that in the absence of the Twelfth Imam (a), who is at this time out of our reach, the jurisprudents who possess the necessary qualifications have been given the authority of governance over the rest of the Muslims. They have authority similar to the Infallible Imams (a) and this is a manifestation of the same government which the last Prophet (s) began.
[i] Kuleini, Al-Kafi, vol. 2, pg. 18, Daar al-Kutub al-Islamiyyah, Tehran, 1365.
During the time of his prophethood, the Prophet Muhammad (s) passed through many various periods:
1- The period of secrecy: this was the period when his prophethood was kept concealed and the message was propagated in a specific manner; this period lasted three years.
2- The period of open propagation: this was the period in which the message was propagated in a general manner. This period lasted for 10 years.
After the passing of this thirteen year period in Makkah, a new atmosphere was opened to Islam and the Muslims with the emigration of the Prophet (s) to the city of Madinah. As soon as this new atmosphere came into existence for the Muslims, the Prophet (s) formed a complete government with all of its necessary branches and facets (even though it was initially small in size and scope). According to traditions narrated from historical sources, in the second year Hijri, the Prophet (s) gave the order for the counting of all the Muslim men; the number discovered in this is not a very large number. In our opinion, the number was less than 1,000, and if we were to add the figure of women and children, then the number would rise to possibly five to six thousand Muslims. Nevertheless, with this small number of individuals, the Prophet (s) formed a complete governmental system. During the end of the Prophet’s (s) life, the number of Muslims had increased dramatically, and the verse ‘And thou dost see the people enter Allah's Religion in crowds’  is evidence of this.
Now the main question is as to why this government was established? Why did the Prophet (s) establish such an institution at the very first opportunity? In our opinion this was a divinely inspired matter; in addition, this is a matter which extends to all aspects of human life and this is understood from a tradition by Imam Baqir (a) who said: (...وَ لَمْ یُنَادَ بِشَیْءٍ کَمَا نُودِیَ بِالْوَلَایَ)  , which means that no one has been invited or called to anything like that of Wilayah (Guardianship). Therefore, it is the issue of governance and government which gives meaning and structure to everything else in the society.
Imam Khomeini has said the following in regards to the goals of the Prophets (a): The Prophets (a) came in order to break these powers; in order to conquer these satanic powers, and the Honorable Prophet (s) also came in order to break these powers. These are from amongst the goals of the Prophets (a), and it does not mean that it is the only thing they have come to accomplish. The true goal of the Prophets (a) is to help the people reach completion and perfection and all of the other issues are simply a means. The ultimate goal, is [man’s] perfection. It is not as if the Prophets (a) came for this world (in order to solely govern over it). The world is a means for reaching perfection; it is similar to how the materialistic and worldly people have used this world in a manner opposed to the ways of reaching perfection. There is a difference between those who work for the sake of worldly power and satan, and those who work for the sake of God; these two are different in their essence. The Prophets (a) did not take even one step towards materialism, governance, power, and the seeking of this world. If anyone even thinks that the Prophets (a) and the Awliya took even one step towards worldly power and rule, then this individual is completely unfamiliar with them and he has not acquainted himself with them… 
Therefore, the goal of the Prophets (a) was not a worldly based goal. The Prophet of Islam (s) was not after the seeking of power, position, or wealth; rather, he was after the building up of individuals in all of their various aspects. Worldly rule and governance were simply a means towards these ends. Therefore, in essence, religious rule seeks these same ends. The Prophetic message found continuance on the Day of Ghadeer through the institution of the Imamate. The Holy Quran states: ‘«...الْیَوْمَ أَکْمَلْتُ لَکُمْ دینَکُمْ وَ أَتْمَمْتُ عَلَیْکُمْ نِعْمَتی وَ رَضیتُ لَکُمُ الْإِسْلامَ دیناً...’  , which is conveying that if all of what Islam encompassed was put on one side of a scale, and the element of wilayah (which is the existential continuation of the prophet and manifested in Imam Ali (as)) on the other, they would balance out. This was a great blessing that the religion became complete and reached perfection through him. Therefore, this existential continuation continued with Imam Hasan (a) and the other Imams (a) after Imam Ali (a).
The Hadith al-Kisaa is a famous tradition which has been referenced in both the books of the Shia and the Sunni  through various different sources. In the books of both sects the tradition has been mentioned in the following manner: ‘One day the Holy Prophet (s), Imam Ali (a), the lady Fatima (a), Imam Hasan (a), and Imam Hussein (a) were gathered in the house of Umm Salameh when the Prophet (s) spread a cloak over himself and these four individuals and made the following supplication: Oh Lord, these (individuals) are my family (Ahlul Bait) and my special relatives; so remove every impurity from them and make them pure and purified (from every impurity). After this, the angel Gabriel entered the home and revealed the following verse: (...إِنَّما یُریدُ اللَّهُ لِیُذْهِبَ عَنْکُمُ الرِّجْسَ أَهْلَ الْبَیْتِ وَ یُطَهِّرَکُمْ تَطْهیراً),  which means: ‘And Allah only wishes to remove all abomination from you, ye members of the Family, and to make you pure and spotless.’ When the wife of the Prophet (s) asked as to who the ‘family’ (ahlul bait) consisted of, the Prophet (s) gave the following answer: (انا و علی و فاطمه و الحسن و الحسین)  . If anyone were to pay the slightest attention to this verse, they would clearly understand the infallible position of these five individuals.
In our opinion, the concept of ‘The Guardianship of the Jurist’ has an established religious foundation and it is a concept made active during our current time, which is the time of the occultation of the 12th Imam (a). Since this is a time when we cannot make direct use of the 12th Imam (a), then the qualified jurisprudents (who are his representatives) possess the necessary ‘Guardianship’ over the Muslims and the concept of ‘The Guardianship of the Jurist’ is a manifestation and extension of the infallible Imams (a) and the continuation of the ‘Guardianship’ of the Prophet (s).  It is possible that someone may say: Before the revolution people would also pray, fast, and go on the Hajj pilgrimage; therefore, what changes have taken place when the revolution took place?
In response, we say: First of all, what percentage of the people used to offer their prayers before the revolution and in what atmosphere and conditions would people pray in, and how has that changed today? Before the revolution, religious students and professors would secretly offer their prayers. Before the revolution, prayer was considered to be without any value in the opinion of the common people; people would secretly pray in order that they would not be looked down upon in the eyes of their coworkers, colleagues, and friends.
Therefore, being religious was not considered as an honor; the prevailing values in the society were non-religious in their essence and in many cases, anti-religious. It was only when these values were changed, that prayers and being religious have become a positive value in the society. Secondly, the prevailing atmosphere of the society today pulls people towards a religious reality, while the atmosphere which prevailed beforehand pulled people towards a non-religious atmosphere. In conclusion, when the religion is combined with politics, it creates a living reality in the society and when the government is a religious one, it actually imparts meaning and honor to things like prayer and fasting. A prayer which is recited in such an environment is not only a personal matter between an individual and his lord, rather it contains numerous social ramifications as well.
An important point which we should consider is that the Holy Quran has given us a means to judge the level of our success. For example, the Holy Quran has said: (..وَ أَقِمِ الصَّلاةَ إِنَّ الصَّلاةَ تَنْهى عَنِ الْفَحْشاءِ وَ الْمُنْکَرِ)  , which means: ‘and establish regular Prayer: for Prayer restrains from shameful and unjust deeds’. According to this, prayer, the criterion of fahsha (corruption), and the Munkar all have a relationship with one another; the deeper prayer becomes established in a society, the less corruption and Munkar will take place. Therefore, we have a means of testing to what level Islamic values have been established in a given society.
For further research and information, please refer to the following:
1. ‘The Guardianship of the Jurist’ in the Quran; Question 2194 (Site: 2498)
2. The history of the viewpoint of the Guardianship of the Jurist: Question 9736 (Site: 9717)
3. The various facets of Sheikh Tusi on the subject of gover nance: Question 1725 (Site: 1740)
4. The Family of the Prophet of Islam (s): Question 1249 (Site: 1257)
5- The Responsibility of the Prophet (s) in regards to the faith of the people: Question 113 (Site: 1347)
 Nasr:2 “وَ رَأَیْتَ النَّاسَ یَدْخُلُونَ فی دینِ اللَّهِ أَفْواجاً”.
 Al-Kafi, vol. 2, pg. 18, Daar al-Kutub al-Islamiyyah, Tehran, 1365.
 Khomeini, Seyyed Ruhullah, Sahifeye Imam, vol. 12, pp. 425-426, The Office for the Publication of Imam Khomeini’s Works, Tehran, fourth print, 1386.
 Ma’idah:3 “…Today I have perfected your religion for you, and I have completed My blessing upon you, and I have approved Islam as your religion…”
 Musnad Ahmad bin Hanbal, vol. 2, pg. 292; Fadaa’il al-Khamsah min al-Sihaah al-Sittah, vol. 1, pg. 214.
 Ahzab:33 “…Indeed Allah desires to repel all impurity from you, O People of the Household, and purify you a thorough purification”.
 Refer to: “The chain of the Hadith of Kisa”, Question 8909 (website: 8928) and “The household of the Prophet”, Question 1249 (website: 1257).
 Refer to: Hadavi Tehrani, Mahdi, Velayat va Diyanat, the chapter on the guardianship of the jurist, Cultural Institute of Kherad, Qom.
 Ankabut:45 “…and maintain the prayer. Indeed the prayer prevents indecencies and wrongs”