Answer
Musa al-Kazim, the seventh Imam of Twelver Shia Islam, spent much of his adult life in Abbasid prisons. After the death of his father, Jafar al-Sadiq, in 765 CE, Musa al-Kazim was initially allowed to live in Medina under the protection of the Abbasid caliph Al-Mansur. However, in 783 CE, Al-Mansur had Musa al-Kazim arrested and imprisoned in Baghdad.