Akbar Hashemi Rafsanjani to Ruhollah Khomeini. This led to the establishment of Expediency Discernment Council, which later he chaired the council. He had an active role in Iran–Contra affair, which was divulged by Mehdi Hashemi and failed. Mehdi Hashemi was executed but Rafsanjani was the loser at internal dimension. In October 1981 presidential election, when he voted to Ali Khamenei, he said it's vote of "Imam (Khomeini), clerics and the parliament". During differences between Prime Minister Mir-Hossein Mousavi and Khamenei, Hashemi cleverly managed to keep the position favor or against these two perspectives and take the middle position. According to Bahman Bakhtiari, at
Mir-Hossein Mousavi many others believed the results to be fraudulent, suggesting that the Interior Minister, Sadegh Mahsouli, an ally of Ahmadinejad, interfered with the election and distorted the votes to keep Ahmadinejad in power. Mousavi has claimed victory, and called for his supporters to celebrate it, sparking large protests as a result. Due to protests, from the opposition, the Supreme Leader ordered a partial recount of the election results. The recount was a random counting of 10% of the ballots. In order to create transparency, a 12-member council showed the recount on television, and concluded that President Ahmadinejad still led Mousavi after