Prime ministership of Mir-Hossein Mousavi secret negotiations and dealing with USA on helping them free the American hostages in Lebanon, in return for sale of the American weapons and spare-parts that Iran's army badly needed for Iran–Iraq War. Shortly after the end of Iran–Iraq War on 20 August 1988, Ruhollah Khomeini died, and Ali Khamenei was elected as the new Supreme Leader by the Assembly of Experts. Following his death, Mousavi and his fellow left-wingers lost their main source of support within the establishment. During the parliament hearing on post-war reconstruction plans, Mousavi had heated arguments with Ali Akbar Hashemi Rafsanjani, the speaker of Iran's
Mir-Hossein Mousavi sphere. When Khomeini, the founder of the Islamic Republic, died in 1989, Mousavi was no longer welcome in the government. It was the start of 20 years of an almost total absence from public life for Mousavi, which many considered as a sign of his disapproval of the established government, though he did sit on two high-level government councils. In 1989, Ali Khamenei named him as a member of the Expediency Discernment Council, his membership of which still continues. Mousavi has been a member of the Supreme Council of Cultural Revolution since 1996. He was also the political adviser of