Murtadha al-Ansari was born in
Dezful around 1799 to ethnic
Arab parents, right around when the
Qajar dynasty had established its power in Iran. He commenced his religious studies in Dezful, under the tutelage of his uncle, himself a notable scholar. At the age of twenty, he made
Ziyara with his father to
Karbala,
Iraq, where he met Mohammad Mujtahid Karbala'i, the leader of the city's scholars. Ansari demonstrated considerable promise during a debate with the senior Mujtahid, who was so impressed that he induced his father to allow Ansari to continue his studies with them. Ansari studied in Karbala for four years, until the city was besieged by
Dawud Pasha and his rebels, causing the scholars of Karbala and their students to flee to
Baghdad and the shrine of
Musa al-Kazim. From there, Ansari returned to his homeland, where he quickly became restless and resolving to find teachers to continue his religious instruction. After about a year of traveling, he spent two years in
Najaf studying under Musa al-Ja'fari and Sharif Mazandarani and a year in Najaf studying with Kashf ul-Ghita. Returning from a pilgrimage to
Mashhad,
Khorasan, he encountered
Ahmad Naraqi, an authority in
Fiqh,
Usul al-fiqh and
Irfan, and – although Ansari was already a
Mujtahid in his own right when he left Karbala – studied with him for a further four years. After again traveling for a number of years, he returned to Najaf where he completed his studies under Kashf ul-Ghita and
Muhammad Hasan al-Najafi (author of
Jawahir ul-Kalam) and began teaching. ==Religious leadership==