Raisi has served in several positions in homeland’s judicial system, such as Deputy Chief Justice (2004–2014), Attorney General (2014–2016), and Chief Justice (2019–2021). He was also Prosecutor and Deputy Prosecutor of capital in the 1980s and 1990s. He was Custodian and Chairman of Astan Quds Razavi, a bonyad, from 2016 until 2019.