Therefore...
Therefore, every oppressive king, particularly the contemporaries of Imam Hasan al-Askari (a.s.), strove to prevent the birth of Imam Mahdi (a.t.f.s.) and his advent in this world. Also, as the Messenger of Allah (S) had prophesied that the number of Imams will be twelve, and that Imam Hasan al-Askari (a.s.) will be the eleventh Imam, (and Mahdi the twelfth), they were sure that Mahdi will be born in his house only. Consequently, tight security and strict surveillance was imposed.
But just as Firaon had failed in his machinations to prevent the birth of Hazrat Musa (a.s.), which ultimately did occur, in the same way, despite all their efforts, the oppressors could not stop the birth of Imam Mahdi (a.t.f.s.). As there was a great danger to the life of Imam Mahdi (a.t.f.s.), the news of his birth was not announced to all and sundry. Only those who could be relied upon were informed about this holy occurrence.
After the martyrdom of Imam Hasan al-Askari (a.s.), when the Imamate and leadership of Imam Mahdi (a.t.f.s.) began, the perils to his life increased. His residence was raided umpteen times by the king's army. Hence, on divine command, Imam al-Zaman (a.t.f.s.) went into occultation. On the one hand, conditions were threatening and danger loomed large. While on the other, the masses had their queries and posers for which contact with Imam (a.s.) was necessary.
Considering this necessity, Imam (a.s.) appointed four special deputies, through whom contact with Imam (a.s.) could be possible. These four persons were called as Special Deputies (Nuawwaab al-Arba' or Naaebeen al-Khaas). The names of these Special Deputies were as follows (in chronological order): Usman Ibn Saeed Amri Muhammad Ibn Usman Ibn Saeed Amri Husayn Ibn Rauh Nawbakhti ‘Ali Ibn Muhammad Seymouri The series of special deputyship started from 260 A.H. and terminated in the year 329 A.H.
(i.e. 69 years). This period is called as Minor Occultation (Ghaibat al-Sughra). The year 329 A.H., with the death of the fourth deputy, ‘Ali Ibn Muhammad Seymouri, marked the end of minor occultation and the beginning of the Major Occultation (Ghaibat al-Kubra). Till Allah the Almighty does not permit Imam al-Zaman (a.t.f.s.) to reappear, the major occultation will continue.
Today, we are living in the era of the major occultation in which, Imam al-Zaman (a.t.f.s.) has not appointed any special deputy. But he has also not abandoned us.