Final answer:
The Imam in Shi'ism is the spiritual leader, beginning with Ali, revered for his connection to the Prophet Muhammad. Within Twelver Shi'ism, which is the majority, there are twelve infallible Imams, with the last Imam expected to return for the Day of Judgment.
Step-by-step explanation:
The Imam in Shi'ism is a pivotal figure who serves as the spiritual and sometimes political leader of the Shia Muslim community. According to Shia belief, the Imamate began with Ali ibn Abi Talib, the cousin and son-in-law of the Prophet Muhammad. Ali is considered by the Shia to be the first Imam and is revered for his direct link to the Prophet through his marriage to Fatima, Muhammad's daughter. The Shia uphold that only those in the line of Ali and Fatima are divinely appointed to offer definitive religious guidance, an idea which solidifies the special status of the Twelve Imams in Twelver Shi'ism.
Twelver Shi'ism, which constitutes about 95 percent of the Shia population, recognizes twelve infallible Imams chosen by God. This sect awaits the return of the twelfth Imam, Muhammad al-Mahdi, who is believed to be in 'mystical hiding' since the ninth century. Upon his return, alongside Jesus, he is prophesized to defeat evil and usher in the Day of Judgment. Meanwhile, a smaller sect, the Zaydis or Seveners, diverge after the fifth Imam and have their own line of leaders.
Another notable point in Shia history was under the Safavid dynasty, when Shah Ismail declared Shi'ism as the state religion of Iran in 1501. This proclamation aligned the state's religious ideology with Twelver Shi'ism and highlighted the fusion of spiritual and temporal power within the concept of the Imamate.