
During the final years of Iran–Iraq War Rafsanjani was the
de facto commander-in-chief of the Iranian military. Rafsanjani was elected chairman of the Iranian parliament in 1980 and served until 1989. He played an important role in the choice of Ali Khamenei as Supreme Leader.