“One day, We shall call together all human beings with their (respective) Imams: those who are given their record in their right hand will read it (with pleasure), and they will not be dealt with unjustly in the least.”
Holy Qur’an, (17:71)
With Prophet Mohammad (pbuh), the long line of Messengers is closed, for God, who has full knowledge of all things, declared him the “Seal of the Prophets” Holy Qur’an, (33:40).
After Him, there will be on more prophets.
However, God has not left us without guidance. There is an infallible Spiritual Guide or Imam in every age to whom alone God entrusted the guidance of the believers. The Imamat descended through family of the Prophet, and the Imam possesses the esoteric knowledge of religion first passed on to Hazrat Ali, and then to his descendants. The Imams receive the divine light given by God to enable them to guide us from the darkness into the light.
“And there are, certainly, among the People of the Book, those who believe in Allah, in the revelation to you, and in the revelation to them, bowing in humility to Allah; they will not sell the Signs of Allah for a miserable gain! For them is a reward with their Lord, and Allah is swift in account.” Holy Qur’an (3:199)
A principal function of the Spiritual Guide is to enable the believers to go beyond the apparent or outward form of the teachings of Islam in search of its reality. A believer who sincerely submits to the Imam’s guidance, will cognize God through the knowledge of self.
Prophet Mohammad (pbuh) said:
“Who dies without knowing the Imam of his time, dies as an infidel.”
According to Imam Ja’far Sadegh (pbuh), the Spiritual Teacher or Imam, is a pure essence who is introduced by God through his Light in the heart of the believer. He is a pure essence beyond the boundaries of time and place. He is ever present, and is the Light of the Path in believer’s inward journey.
The Lord of the believers, Hazrat Ali (pbuh) has said:
“Faith is manifested in the heart as a ray of light, and as faith increases, the light spreads.”
“The ray of light is the Source of Life in the heart; it is man’s reality and the fountain of eternal knowledge.” 
- Molana Shah Maghsoud Sadegh Angha, Al-Rasa’el – Al-Salat, (M.T.O. Shahmaghsoudi Publications®, Tehran, 1975) pp.38