The Occultation of Imam Mahdi A.S
1. Free From Allegiance of Every Tyrant
Amirul Momineen Ali (A.S.) said,
"Certainly', when the Qaem from among us shall arise, he will not have the allegiance of any one upon his neck. It is for this reason that his birth is secret and his person is in Ghaibat." (Kamaaluddin Vol.1. Pg.303)
2. Test of the People
Imam al Kazim (A.S.) said,
"My son ! when the fifth descendant of the seventh of the Imams is not visible to you ! It is when Allah will test your belief. Ghaibat is inevitable for the Master of this affair. Till the time when the religion is completely transformed, and only a few people will have belief in him. My son ! That Ghaibat, It is a trial through which Allah, the Almighty tests His servants."
(Ghaibat-e-Toosi Pg.166 and 337. Al Kafi vol.1 Pg.336. Kamaaluddin vol.2 Pg.359 and 360. Kifayatul Asar Pg.264-265)
3. Fear of the Enemy
Imam Musa al-Kazim (A.S.) said,
"The Qaem is the one who will purify the earth from the enemies of Allah, the High and the Mighty. And he will fill the earth will justice and equity just as it is filled with injustice and tyranny. He is the fifth of my descendants. He will go into occultation due to the fear of his own (life)."
(Kamaaluddin vol.2 Pg.361. Kifayatul Asar Pg.265-266)
4. Weakness and Lack of Co-operation of the People
Imam Mahdi (A.S.) said.
"If our Shias; May Allah help them in His obedience; would have fulfilled their covenant with united hearts then there would have been no delay in our meeting, and they would have been blessed with our visitation at the earliest, along with the recognition of truth and confirmation of our rights."
(Al Ihtejaj vol.2 Pg.602).
Source: http://imamalmahdi.com
Other Links:
Responding to Some Points Raised By Ibn Khaldun (Part 2)
The Existence of the Mahdi is certain
Other Opinions from Ibn Khaldun
People Awaited the Appearance of the Mahdi
The Jurists of Medina and the Mahdi Traditions