During the imamate of the fifth Imam...
During the imamate of the fifth Imam, as a result of the injustice of the Umayyads, revolts and wars broke out in some corner of the Islamic world every day. Moreover, there were disputes within the Umayyad family itself which kept the caliphate busy and to a certain extent left the members of the Household of the Prophet alone.
From the other side, the tragedy of Karbala and the oppression suffered by the Household of the Prophet, of which the fourth Imam was the most noteworthy embodiment, had attracted many Muslims to the Imams. These factors combined to make it possible for people and especially the Shi'ites to go in great numbers to Medina and to come into the presence of the fifth Imam.
Possibilities for disseminating truths about Islam and the sciences of the Household of the Prophet, which had never existed for the Imams before him, were presented to the fifth Imam. The proof of this fact is the innumerable traditions recounted from the fifth Imam and the large number of illustrious men of science and Shi'ite scholars who were trained by him in different Islamic sciences. These names are listed in books of biographies of famous men in Islam.
The Sixth Imam Imam Ja'far ibn Muhammad, the son of the fifth Imam, was born in 83/702. He died in 148/765 according to Shi'ite tradition, poisoned and martyred through the intrigue of the Abbasid caliph Mansur. After the death of his father he became Imam by Divine Command and decree of those who came before him. During the imamate of the sixth Imam greater possibilities and a more favorable climate existed for him to propagate religious teachings.
This came about as a result of revolts in Islamic lands, especially the uprising of the Muswaddah to overthrow the Umayyad caliphate, and the bloody wars which finally led to the fall and extinction of the Umayyads. The greater opportunities for Shi'ite teachings were also a result of the favorable ground the fifth Imam had prepared during the twenty years of his imamate through the propagation of the true teachings of Islam and the sciences of the Household of the Prophet.
The Imam took advantage of the occasion to propagate the religious sciences until the very end of his imamate, which was contemporary with the end of the Umayyad and beginning of the Abbasid caliphates.