After Khomeini’s death in June 1989, Rafsanjani was instrumental in ensuring that Pres. Ali Khamenei—who was hastily elevated from the position of hojatoleslām to the rank of ayatollah—succeeded Khomeini as supreme leader. Rafsanjani himself was elected Iran’s president by an overwhelming margin shortly thereafter.