Prime ministership of Mir-Hossein Mousavi were the third and fourth government of Iran after the Iranian Revolution. At that time, Ali Khamenei was the president.
Khamenei was a key figure in the Islamic revolution in Iran and a close confidant of Ayatollah Khomeini.
Khomeini appointed Khamenei to the post of Tehran's Friday prayers in the autumn of 1989, after forced resignation of Grand Ayatollah Hossein-Ali Montazeri from the post, when he criticised Khomeini for torture of prisoners. He served briefly as the Deputy Minister for Defence and as a supervisor of the Islamic Revolutionary Guards. He also went to the battlefield as a representative of the defense commission of the parliament. In June 1981, Khamenei narrowly escaped an assassination attempt when a bomb, concealed in a tape recorder at a press conference, exploded beside him. He was permanently injured, losing the use of his right arm.
In 1981, after the assassination of Mohammad-Ali Rajai, Khamenei was elected President of Iran by a landslide vote in the Iranian presidential election, October 1981 and became the first cleric to serve in the office. Ayatollah Khomeini had originally wanted to keep clerics out of the presidency but later changed his views.
In his presidential inaugural address Khamenei vowed to eliminate "deviation, liberalism, and American-influenced leftists". Vigorous opposition to the regime, including nonviolent and violent protest, assassinations, guerrilla activity and insurrections, was answered by state repression and terror in the early 1980s, both before and during Khamenei's presidency. Thousands of rank-and-file members of insurgent groups were killed, often by revolutionary courts. By 1982, the government announced that the courts would be reined in, although various political groups continued to be repressed by the government in the first half of the 1980s.