The Shi'is believe in the continued grace of God on humankind, who would never leave them without his continued guidance. That is reason why he sent his messengers and prophets to the earth, the last of whom was Muhammad, to guide them along the path of truth and justice. Unlike the Sunni belief that Prophet Muhammad was the 'seal of the prophets', after whom there would be none like him, Shi'i theology maintains that God would ensure a spiritual guarantor in every age to direct the community and uphold the truth of the revelation.
The 'Imam' (from Arabic root 'amana' meaning 'in front of') is the not only the 'guide' (Hadi) and proof of God (Hujja) but also the leader of the community (wilayat al-faqih) appointed to play a fundamental role in the relations between God and men. Thus the fifth Imam (fifth leader of the Shi'is from Prophet Muhammad), Muhammad al-Baqir, is reported to have said: 'By God! God has not left the earth, since the death of Adam, without there being on it an Imam guiding (the people) to God. He is the Proof of God to His servants and the earth will not remain without the proof of God to his servants.'
The Imams are conceived in mystical terms as being the light that God created before the creation of the material world. The light, which is the inner essence of the Imams descended on Adam and then upon each of the Prophets and Imams until it became embodied in Muhammad, Ali (Prophet's cousin and son-in-law), Fatima (Prophet's daughter), and the twelve Imams of Shi'ism. There was a split in divine light between the Prophet and Ali, which was united with the marriage of Fatima and Ali. The successors of Ali are the Imams in Shi'ism. From a purely religious point of view, the Imams are like the Prophet ' equal to him in terms of knowledge and religious authority.
The Imam is the Proof of God (Hujjat Allah) to mankind and the sign of God (Ayat Allah) on Earth. Indeed Ali declared: 'God has no greater sign than me.' The Imam is the successor of the Prophet and the Vicar of God on earth. All political authority and sovereignty is his. Obedience to him is obligatory. The sixth Imam, Jafar as Sadiq, said: 'He who recognised us is a believer (mu'min) and he who has denied us is an unbeliever (kafir) and he who has neither recognised nor denied us is in error and unless he returns to the right guidance which God has made obligatory for him' .'
The Imam cannot be chosen by infallible men and left to the vicissitudes of history. He must fulfill certain conditions to qualify for the Imamate: be perfectly learned in religious and worldly matters, be absolutely just and equitable, be free from sin and error, be the most perfect man of his time ' the Imam is known by divinely-inspired designation (nass) by the prophet or Imam who preceded him. Thus the infallible Imam links the human community with the 'other world'.
The Imam is the spiritual wali (master/friend) who initiates humankind into the inner truths of religion by interpreting the esoteric meaning of scripture. It is through him that God's grace reaches the Earth. Whereas the apostles and prophets are concerned with the external aspect of religion, i.e. legislation of religious laws and ordinances, the Imam is concerned primarily with the deeper meaning of religion, guiding human beings onto the path of spiritual enlightenment and progress. The Imam is therefore, at once a master and a friend inspiring the 'true' journey of the human spirit.