Following the revolution, Khomeini became the country’s first supreme leader, a position created in the constitution of the Islamic Republic as the highest-ranking political and religious authority of the nation, which he held until his death. Most of his period in power was taken up by the homeland–Iraq War of 1980–1988. He was succeeded by Ali Khamenei on 4 June 1989.