The Prime Minister of Iran was a political post in Iran that had existed during several different periods of time starting with the Qajar era until its most recent revival from 1979 to 1989 following the Iranian Revolution.
In the Qajar era, prime ministers were known by different titles. The post itself was mainly known as ataabak or ataabak-e a'zam, or sometimes sadr-e a'zamat the beginning, but became ra'is ol-vozaraa at the end. The title of nakhost vazir was rarely used. The prime minister was usually called by the honorific titlehazrat-e ashraf. Reza Khan Sardar Sepah became the last prime minister of the Qajar dynasty in 1923. For a list of Iranian 'prime ministers' prior to 1907 see List of Premiers of Iran.
After the Iranian Revolution of 1979, Ayatollah Khomeini installed Mehdi Bazargan as the Prime Minister of an interim government, which served until November 1979. The government resigned during the Iran hostage crisis, but mentioned that it has not been the sole reason, and the decision for mass resignation had been reached one day before the invasion of the United States embassy by the Iranian students. The post was left empty until Abolhassan Banisadr became president in January 1980 and chose Mohammad Ali Rajai as his prime minister, mainly because of pressures imposed by Majlis representatives, specially those close to Islamic Republic Party. Rajai served in the post until Banisadr's impeachment in June, 1981, and was elected as president in the elections of July 24, 1981. Rajai chose Mohammad Javad Bahonar as his prime minister, but they were assassinated together in Prime Minister's office only a few weeks later, on August 30, 1981. When Ali Khamenei became president in the elections of October, 1981, he first introduced right-leaning Ali Akbar Velayati to the Majlis as his prime minister, but he was voted down by the then left-leaning majority of the parliament, which then forced their own preferred prime minister to Khamenei, namely Mir-Hossein Mousavi. The dispute was finally ended by interference of the Supreme Leader, Ayatollah Khomeini, who advised the president to accept Mousavi. Mousavi served under the title until 1989, when the constitution was amended to remove the title of Prime Minister and divide his responsibilities between the president and a newly created title of First Vice President.