The Occultation (Arabic: غيبة ghayba) in Shia Islam refers to a belief that the messianic figure, or Mahdi, who in Shi'i thought is an infallible male descendant of the founder of Islam, Muhammad, was born but disappeared, and will one day return and fill the world with justice and peace. Some Shia, such as the Nizari, do not believe in the idea of the Occultation.
The groups that do believe in it differ on the succession of the Imamate, and therefore which individual is in Occultation. The Hidden Imam is still considered to be the "Imam of the Time", to hold authority over the community, and to guide and protect individuals and the Shi'i community.
In Twelver Shia Islam, the largest branch of the Shia faith, twelfth imam, Muhammad al-Mahdi, went into Occultation in 874. The Occultation is split into the Minor Occultation and the Major Occultation. According to 7 Shia (Seveners), there are reasons for the Occultation: Imam not being proud of himself and continue to examine world events and make evaluations, only to be loyal and reverent to the Rabb and Allah, which are also in Occultation, the other Muslims sects are to be judged by the Mahdi through the guidance of the Rabb and Allah.
The Minor Occultation (Ghaybat al-Sughra) refers to the period when the Twelver Shia believe the Imam still maintained contact with his followers via deputies (an-nuwāb al-arbaʻa). During this period, from 874 to 941, the deputies represented him and acted as agents between him and his followers.
Shia believe that in 873, after the death of his father Hasan al-Askari, the Eleventh Imam, the 12th Imam was hidden from the authorities of the Abbasid Caliphate as a precaution. His whereabouts were disclosed only to a select few. Four close associates of his father, known as The Four Deputies, became mediators between the Imam and his followers known as Saf’ir until the year 941. This period is considered by Twelvers to be the first, or Minor Occultation (al-Ghaybah).
When believers faced difficulty, they would write their concerns and send them to his deputy. The deputy would receive the decision of the Imam, endorse it with his seal and signature, and return it to the concerned parties. The deputies also collected zakat and khums on his behalf. For the Shia, the idea of consulting a hidden Imam was not something new, because the two prior Imams had, on occasion, met with their followers from behind a curtain.
System of the DeputyEdit
According to Twelvers, under the critical situation caused by Abbasides, Ja'afar al-Sadiq was the first to base the underground system of communication in the Shia community. By the time of al-Javad, the agents took the tactic of al-Taqiyya to take part in government. From the time of al-Reza, the Imams were under the direct control of the authorities and the direct contact between the Imam and the community was disconnected. The situation led to the increase in the role of deputies. The deputies undertook the tasks of Imams to release them from the pressure of the Abbasids. Shi'a tradition holds that the Four Deputies acted in succession:
- Uthman ibn Sa'id al-Asadi († 873–874): He was the first deputy appointed by 12th Imam who governed for one year;
- Abu Jafar Muhammad ibn Uthman († 874–916): He was the second deputy appointed by 12th Imam for forty-two years;
- Abul Qasim Husayn ibn Ruh al-Nawbakhti († 916–937): He was the third deputy appointed by Al-Mahdi for twenty-one years;
- Abul Hasan Ali ibn Muhammad al-Samarri († 937–940): He was the last deputy of 12th Imam for three years.
The fourth deputy died six days later, and Twelvers continue to await the reappearance of the Mahdi. In the same year, many notable Shi'i scholars such as Ali ibn Babawayh Qummi and Muhammad ibn Ya'qub al-Kulayni, the learned compiler of al-Kāfī, also died. 
The Major Occultation denotes the second, longer portion of the Occultation, which continues to the present day. Shia believe, based on the last Saf’ir's deathbed message, that the Twelfth Imam had decided not to appoint another deputy. Thus, al-Samarri's death marked the beginning of the second or Major Occultation. According to the last letter of Muhammad al-Mahdi to Ali ibn Muhammad al-Samarri,
from the day of your death [the last deputy] the period of my major occultation will begin. Henceforth, no one will see me, unless and until Allah makes me appear. My reappearance will take place after a very long time when people will have grown tired of waiting and those who are weak in their faith will say: What! Is he still alive?"
Rest assured, no one has a special relationship with God. Whoever denies me is not from my (community). The appearance of the Relief depends solely upon God. Therefore, those who propose a certain time for it are liars. As to the benefit of my existence in occultation, it is like the benefit of the sun behind the clouds where the eyes do not see it. - Kitab al-Kafi, Muhammad ibn Ya'qub al-Kulayni 
With regard to advice for his followers during his absence, he is reported to have said: "Refer to the transmitters of our traditions, for they are my hujja (proof) unto you and I am God’s proof unto them."
Before the rise of the Fatimid Caliphate, a small group of Ismailis, the Qarmatians, believed that Muhammad ibn Isma'il had gone into Occultation and were called "Seveners" to reflect their belief in only seven Imams, Muhammad's father Isma'il being the last until his return. The Qarmatians accepted a Persian prisoner by the name of Abu'l-Fadl al-Isfahani, who claimed to be the descendant of emperors, as the returned Muhammad ibn Isma'il and also as the Mahdi. The Qarmatians rampaged violently across the Middle East in the 10th century, climaxing their bloody campaign with the stealing of the Black Stone from the Kaaba in Mecca in 930 under Abu Tahir al-Jannabi. After the arrival of the Mahdi they changed their qibla from the Kaaba to the Zoroastrian-influenced fire. After their return of the Black Stone in 951 and defeat by the Abbasids in 976 they slowly faded out of history and no longer have any adherents.
According to Tayyibi Isma'ilism, during the Occultation of the twenty-first imam, at-Tayyib Abu'l-Qasim, a Da'i al-Mutlaq "Unrestricted Missionary", maintains contact with him. The several branches of the Musta'li Shia differ on who the current Da'i al-Mutlaq is.
The Nizari Isma'ili believe that there is no Occultation at all, that the Aga Khan IV is the 49th Imam of the Time. They believe that the Imam's authority is no different from the authority of Ali, the first Imam; he currently provides guidance to Nizaris on worldly and spiritual matters.
The Druze believe the imam Al-Hakim bi-Amr Allah went into the Occultation after he disappeared in 1021 followed by the four founding Da'i of the Druze sect including Hamza ibn-'Ali ibn-Ahmad leaving the leadership to a fifth leader called Baha Al-Din. The Druze refused to acknowledge the successor of Al-Hakim as an Imam but accepted him as a Caliph. The faith further split from Ismailism as it developed unique doctrines which often classes it separately from both Ismailism and Islam, these include the belief that Al-Hakim bi-Amr Allah was God incarnate.
The Zaidi believe that there is no occultation at all and that any descendant of Hassan or Hussain could become Imam. The Imam must rise up against oppression and injustice and rule as a visible and just ruler.
Some scholars, including Bernard Lewis, point out that the idea of an Imam in occultation was not new in 873 but that it was a recurring factor in Shia history. Examples of this include the cases of Muhammad ibn al-Hanafiyyah (according to the Kaysanites), Muhammad al-Nafs al-Zakiyya, Musa al-Kadhim (according to the Waqifite Shia), Muhammad ibn Qasim (al-Alawi), Yahya ibn Umar and Muhammad ibn Ali al-Hadi.
In the Bahá'í Faith, which sees the Báb as fulfilling the Islamic prophecy of al-Mahdi, Bahá'u'lláh and `Abdu'l-Bahá considered the story of the Occultation of the twelfth imam in Twelver belief to have been a pious fraud conceived by a number of the leading Shí`ahs in order to maintain the coherence and continuity of the Shí`ah movement after the death of the 11th Imam, Hasan al-`Askarí. Bahá'ís believe that Sayyid `Alí Muhammad-i-Shírází, known as the Báb, is the promised Twelfth Imam, the Mahdi, who had already made his advent and fulfilled all the prophecies. Although there is an unpublished repentance note of Sayyid Ali Muhammad-i-Shirazi's (Tawbah Nama)  among government documents, modern scholars have noted that to appease the religious clergy, the government may have spread rumours that the Báb recanted.  Scholars have also noted that the document of his alleged recantation was written shortly after his trial in Tabriz, was unsigned, undated and unaddressed to any government official or people.  Some authors theorise that the assertions were made to embarrass the Báb and undermine his credibility with the public and that the language of this document is very different from the Báb's usual style, and so prepared by the authorities.  The Shaykhi movement of the early 19th century claimed to have made preparations for the Mahdi. In 1848 the Báb and his followers began to teach more openly, and the Báb was publicly executed in July 9, 1850 A.D (twenty-eighth of Sha’bán, in the year 1266 A.H).
- Hussain, Jassim M. (1982). The occultation of the Twelfth Imam. London, England: Muhammadi Trust. ISBN 978-0-907794-01-1.
- Mohammed Raza Dungersi. A Brief Biography of Imam Muhammad bin Hasan (a.s.): al-Mahdi. Bilal Muslim Mission. pp. 19–21.
- Association of Imam Mahdi. Special Deputies.
- Zahra Ra'isi (2013). "The Special Deputies of Imam Mahdi (as)" (PDF). Message of Thaqalayn. 14 (1): 80.
- Ronen A. Cohen. The Hojjatiyeh Society in Iran: Ideology and Practice from the 1950s to the Present. p. 15.
- Zahra Ra'isi. The Special Deputies of Imam Mahdi (as) (PDF). p. 82.
- Hussain, Hussain M. (1982). The Holy Qur'an. The Muhammadi Trust of Great Britain & Northern Ireland. 0-907794-01-7. Archived from the original on 2008-10-01. Retrieved 2008-09-03.
- "The Occultation of the Twelfth Imam (A Historical Background)". Al-Islam.org. Archived from the original on 2008-10-01. Retrieved 2008-09-03.
- Abbas Amanat, Magnus Thorkell. Imagining the End: Visions of Apocalypse. p. 123.
- Delia Cortese, Simonetta Calderini. Women and the Fatimids in the World of Islam. p. 26.
- Abū Yaʻqūb Al-Sijistānī. Early Philosophical Shiism: The Ismaili Neoplatonism. p. 161.
- Yuri Stoyanov. The Other God: Dualist Religions from Antiquity to the Cathar Heresy.
- Gustave Edmund Von Grunebaum. Classical Islam: A History, 600-1258. p. 113.
- Yuri Stoyanov. The Other God: Dualist Religions from Antiquity to the Cathar Heresy.
- "Qarmatiyyah". Archived from the original on 2007-04-28. Retrieved 2007-04-24.
- 'Aqeedat ul-Muwahhedeen wa Muzehato Maraatib Ahl id-Deen: 8th Da’i-e-Mutlaq Saiyedna Husain bin Saiyedna Ali bin Mohammad al-Waleed (d. 667 AH/1269 AD)
- Cornell, Vincent J. Voices of Islam. Praeger (December 30, 2006). ISBN 978-0275987329.
- Essential Islam: A Comprehensive Guide to Belief and Practice. Praeger (November 12, 2009). ISBN 978-0313360251.
- The Druzes: An Annotated Bibliography by Samy Swayd, Kirkland WA USA: ISES Publications(1998). ISBN 0-9662932-0-7.
- Ismail K. Poonawala. "Review - The Fatimids and Their Traditions of Learning". Journal of the American Oriental Society. 119 (3): 542. doi:10.2307/605981.
- Islamic Dynasties of the Arab East: State and Civilization during the Later Medieval Times by Abdul Ali, M.D. Publications Pvt. Ltd., 1996, p97
- The Assassins: A Radical Sect in Islam, Bernard Lewis, pp. 23, 35, 49.
- Momen, Moojan. Shi`i Islam and the Baha'i Faith Archived 2014-01-09 at the Wayback Machine
- Ali, Muhammad. History and Doctrines of the Babi Movement. Ahmadiyya Anjuman Ishaat Islam (Lahore), USA, 1997. pp. 7–8. ISBN 0913321478.
- Amanat, Abbas (1989). Resurrection and Renewal: The Making of the Babi Movement in Iran. p. 390 - 393.
- Browne, E.G. (1918). Materials for the Study of the Babi Religion. Cambridge: Cambridge University Press.
- Amanat, Abbas (1989). Resurrection and Renewal: The Making of the Babi Movement in Iran. Ithaca: Cornell University Press. pp. 390–393.
- Nabil. The Dawn-Breakers: Nabíl’s Narrative of the Early Days of the Bahá’í Revelation. p. 515. Archived from the original on 2014-01-16. Retrieved 2014-01-30.