Shortly before his death, Khomeini had a disagreement with the heir he had chosen – Hussein Ali Montazeri – so there was no agreed-on successor when Khomeini died. The Assembly of Experts elected Khamenei as the next supreme leader on 4 June 1989, at age 50. According to Akbar Hashemi Rafsanjani, Khamenei was the man Khomeini had chosen as his successor before dying. Khamenei has been head of the servants of Astan Quds Razavi since 14 April 1979.