The Eleventh Imam gained the Imamate, after the death of his noble father, through Divine Command and through the decree of the previous Imams. During the seven years of his Imamate, due to untold restrictions placed upon him by the caliphate, he lived in hiding and dissimulation (taqiyyah) He did not have any social contact with even the common people among the Shi'ite population. Only the elite of the Shi'ah were able to see him. Even so, he spent most of his time in prison. There was extreme repression at that time because the Shi'ite population had reached a considerable level in both numbers and power. Everyone knew that the Shi'ah believed in the Imamate, and the identity of the Shi'ite Imams was also known.
Therefore, the caliphate kept the Imams under its close supervision more than ever before. It tried through every possible means and through secret plans to remove and destroy them. Also, the caliphate had come to know that the elite among the Shi'ah believed that the Eleventh Imam, according to traditions cited by him as well as his forefathers, would have a son who was the promised Mahdi. The coming of the Mahdi had been foretold in authenticated hadith of the Prophet in both Sunni and Shi'ite sources. For this reason the Eleventh Imam, more than other Imams, was kept under close watch by the caliphate.
The caliph of the time had decided definitely to put an end to the Imamate in Shi'ism through every possible means and to close the door to the Imamate once and for all. Therefore, as soon as the news of the illness of the Eleventh Imam reached al-Mu'tamid, he sent a physician and a few of his trusted agents and judges to the house of the Imam to be with him and observe his condition and the situation within his house at all times. After the death of the Imam, they had the house investigated and all his female slaves examined by the midwife. For two years the secret agents of the caliph searched for the successor of the Imam until they lost all hope.
The Eleventh Imam was buried in his house in Samarra' next to his noble father. Here it should be remembered that during their life time the Imams trained many hundreds of scholars of religion and hadith, and it is these scholars who have transmitted to us information about the Imams. In order not to prolong the matter, the list of their names and works and their biographies have not been included here.
al-Imam al-Hasan al-'Askari, peace be Upon him, said:
Generosity has a limit, which when crossed becomes extravagance; caution has a limit which when crossed becomes cowardice; thriftiness has a limit, which when crossed becomes miserliness; courage has a limit, which when crossed becomes fool-hardiness. Let this moral lesson suffice: refrain from doing anything which you would disapprove of if done by someone else.