Until their deaths, the tenth and eleventh Shia Imams (
Ali al-Hadi and
Hasan al-Askari, respectively) were held in the garrison town of
Samarra under close surveillance (or house arrest) by the Abbasids, who are often responsible in Shia sources for poisoning the two Imams. The two Imams witnessed the deterioration of the Abbasid caliphate, as the imperial authority rapidly transitioned into the hands of the Turks, particularly after
al-Mutawakkil. Contemporary to the tenth Imam, the Abbasid
al-Mutawakkil violently prosecuted the Shia, partly due to a renewed
Zaydi opposition. The restrictive policies of al-Mutawakkil towards the tenth Imam were later adopted by his son,
al-Mu'tamid, who is reported to have kept the eleventh Imam under house arrest without any visitors. Instead, al-Askari is known to have primarily communicated with his followers through a network of representatives. Among them was
Uthman ibn Sa'id, who is said to have disguised himself as a seller of cooking fat to avoid the Abbasid agents, hence his nickname al-Samman.
Tabatabai suggests that these restrictions were placed on al-Askari because the caliphate had come to know about traditions among the Shia elite, predicting that the eleventh Imam would father the eschatological
Mahdi. Immediately after the death of al-Askari in 260 (874),
Uthman ibn Sa'id () claimed that the eleventh Imam had a young son, named Muhammad, who had entered a state of
occultation () due to the Abbasid threat to his life. As the special agent of al-Askari, Uthman also claimed that he had been appointed to represent the son of the eleventh Imam. Twelver sources detail that Muhammad al-Mahdi made his only public appearance to lead the funeral prayer for his father instead of his uncle,
Ja'far. Thus began a period of about seventy years, later termed the
Minor Occultation (, 260-329 AH, 874–940 CE), during which it is believed that four successive agents represented the Hidden Imam, collectively known as the
Four Deputies (). An agent () was variously called deputy (), emissary (), and gate (). == Tenure as an agent of al-Mahdi ==