The Apostle of Allah said: After me there will be Twelve Imams or Caliphs: and The first of us is Muhammad; The last of us is Muhammad; In between us are Muhammad; And all of us are Muhammad; For all of us are from One Nur (Light).
The Holy Prophet Muhammad (peace be on him and his progeny) said: "I shall be succeeded by twelve religious leaders, all of whom will be of Qurayshite origin." (al-Bukhari, as-Sahih)
The twelve Imams are these sacred personages and spiritual leaders about whom the Holy Prophet had prophesied. Pointing them out as the source and means of guidance for mankind, the Holy Prophet remarked: "So long as my twelve successors will continue to govern, this religion (Islam) will exist (in this world)." (Abu Dawud, as-Sunan)
On a request from his well-known companion, Jabir ibn Abdillah al-Ansari, the Holy Prophet explained the names of his twelve successors thus: "They are my twelve successors, O Jabir, who will come after me. First of them will be Ali, who will be followed, one after the other, by Hasan, Husayn, Ali ibn al-Husayn, Muhammad ibn `Ali, Ja'far ibn Muhammad, Musa ibn Ja'far, Ali ibn Musa, Muhammad ibn `Ali, `Ali ibn Muhammad, Hasan ibn Ali and lastly by Muhammad al-Mahdi, al-Qa'im (peace be on them)."