And former Iranian President Hashemi Rafsanjani , who lost the presidential election to Ahmadinejad in 2005 , was elected chairman of Iranʼs Assembly of Experts , the body that elects the supreme spiritual leader .