Question: What president was assassinated in an explosion on August 1981, and was succeeded by a man elected as the new Supreme Leader by the Assembly of Experts on 4 June 1989 at the age of 49?
Context: The tenth Iranian presidential election to be held in Iran.  The President of Iran is the highest official elected by direct, popular vote, although the President carries out the decrees, and answers to the Supreme Leader of Iran, who functions as the country's head of state.  Unlike the executive in other countries, the President of Iran does not have full control over anything, as these are ultimately under the control of the Supreme Leader.  Chapter IX of the Constitution of the Islamic Republic of Iran sets forth the qualifications for presidential candidates.  The procedures for presidential election and all other elections in Iran are outlined by the Supreme Leader.  The President functions as the executive of the decrees and wishes of the Supreme Leader.  These include signing treaties and other agreements with foreign countries and international organizations, with Supreme Leader's approval; administering national planning, budget, and state employment affairs, as decreed by the Supreme Leader.  The President also appoints the ministers, subject to the approval of Parliament, and the Supreme Leader who can dismiss or reinstate any of the ministers at any time, regardless of the president or parliament's decision. The Assembly of Experts (Persian: مجلس خبرگان رهبری‎ , "Majles-e Khobregān-e Rahbari " ‎ ) —also translated as the Assembly of Experts of the Leadership or as the Council of Experts— is the deliberative body empowered to designate and dismiss the Supreme Leader of Iran.  However all directly-elected members after the vetting process by the Guardian Council still have to be approved by the Supreme Leader of Iran before gaining membership to the Assembly of Experts. In August 1981, President Mohammad-Ali Rajai and Prime Minister Mohammad-Javad Bahonar were assassinated in an explosion.  Ali Khamenei was then elected as the third president of Iran in the Iranian presidential election, October 1981.  He put forward Ali Akbar Velayati as his prime minister, but the Iranian parliament did not give him the vote of confidence, and he was defeated with a vote of 80 to 74.  Subsequently, Ali Khamenei, though he had strong disagreements with Mousavi, as a compromise with the left-leaning parliament, agreed to offer him, Mousavi, for the post of premier.  On 28 October, the parliament approved Mousavi with a vote of 115 to 39.  Mousavi became the 79th Prime Minister of Iran on 31 October 1981, and remained the prime minister of Iran until 3 August 1989, for eight years. The Supreme Leader of Iran election, 1989 was an indirect election where the Assembly of Experts members voted to choose the second Supreme Leader of Iran.  The election was held on June 4, 1989, the morning after Ruhollah Khomeini's death and Ali Khamenei was elected as his successor with 60 votes out of 74. Sayyid Ruhollah Mūsavi Khomeini (Persian: سید روح‌الله موسوی خمینی‎ ‎ ] ; 24 September 1902 – 3 June 1989), known in the Western world as Ayatollah Khomeini, was an Iranian Shia Muslim religious leader, philosopher, revolutionary, and politician.  He was the founder of the Islamic Republic of Iran and the leader of the 1979 Iranian Revolution that saw the overthrow of the 2500 years of Persian monarchy and Mohammad Reza Pahlavi, the last Shah of Iran.  Following the revolution, Khomeini became the country's 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.  He was succeeded by Ali Khamenei on 4 June 1989. Mohammad-Ali Rajai (Persian: محمدعلی رجائی‎ ‎ ; 15 June 1933 – 30 August 1981) was the second President of Iran from 2 to 30 August 1981 after serving as prime minister under Abolhassan Banisadr.  He was also minister of foreign affairs from 11 March 1981 to 15 August 1981, while he was prime minister.  He was assassinated in a bombing on 30 August 1981 along with prime minister Mohammad-Javad Bahonar. The succession of Ali Khamenei, the current Supreme Leader of Iran, has been a taboo in Iran.  According to the Constitution of the Islamic Republic of Iran, the Supreme Leader is elected by two third majority of the Assembly of Experts members.  however, the Assembly has not elected any deputies since the deposition of Hussein-Ali Montazeri in 1987.  The Assembly elected a Supreme Leader once in the Iranian Supreme Leader election, 1989. Sayyid Ali Hosseini Khamenei (Persian: سید علی حسینی خامنه‌ای‎ ‎ ] ; born 17 July 1939) is a "marja" and the second and current Supreme Leader of Iran.  Khamenei succeeded the first Supreme Leader, Ruhollah Khomeini, after Khomeini's death, being elected as the new Supreme Leader by the Assembly of Experts on 4 June 1989 at the age of 49.  His political career began after the Iranian Revolution, when the former President of Iran, Akbar Hashemi Rafsanjani, then a confidant of Khomeini, brought Khamenei into Khomeini's inner circle.  Later on, the current President of Iran, Hassan Rouhani, then a member of Parliament, arranged for Khamenei to get his first major post in the provisional revolutionary government as deputy defense minister.  Khamenei then went to serve as the third President of Iran from 1981 to 1989 while becoming a close ally to Khomeini.  Eventually, after Khomeini had a fall off with then heir-apparent Hussein Ali Montazeri, Rafsanjani claimed that Khomeini had chosen Khamenei as his successor while the Assembly of Experts deliberated to elect the next Supreme Leader.  Khamenei is head of the servants of Astan Quds Razavi from April 14, 1979. Iran elects on national level a head of state and head of government (the president), a legislature (the Majlis), and an "Assembly of Experts" (which elects the Supreme Leader).  Also City and Village Council elections are held every four years throughout the country.  The president is elected for a four-year term by the people.  The Parliament or "Islamic Consultative Assembly" ("Majlis-e Shura-ye Eslami") has 290 members, elected for a four-year term in multi- and single-seat constituencies.  Elections for the Assembly of Experts are held every eight years.  All candidates have to be approved by the Guardian Council.  See Politics of Iran for more details. The President of Iran (Persian: رییس‌جمهور ایران "Rayis Jomhur-e Irān") is the head of government of the Islamic Republic of Iran.  The President is the highest popularly elected official in Iran (however, the president is still required to gain the Leader’s official approval before being sworn in before the Parliament, and the Leader also has the power to dismiss the elected president anytime).  The President carries out the decrees, and answers to the Supreme Leader of Iran, who functions as the country's head of state.  Unlike the executive in other countries, the President of Iran does not have full control over anything, as these are ultimately under the control of the Supreme Leader.  Chapter IX of the Constitution of the Islamic Republic of Iran sets forth the qualifications for presidential candidates.  The procedures for presidential election and all other elections in Iran are outlined by the Supreme Leader.  The President functions as the executive of the decrees and wishes of the Supreme Leader.  These include signing treaties and other agreements with foreign countries and international organizations, with Supreme Leader's approval; administering national planning, budget, and state employment affairs, as decreed by the Supreme Leader.  The President also appoints the ministers, subject to the approval of Parliament, and the Supreme Leader who can dismiss or reinstate any of the ministers at any time, regardless of the president or parliament's decision.  Iran’s regional policy is directly controlled by the office of the Supreme Leader with the Ministry of Foreign Affairs’ task limited to protocol and ceremonial occasions.  All of Iran’s ambassadors to Arab countries, for example, are chosen by the Quds Corps, which directly reports to the Supreme Leader.
Answer: President Mohammad-Ali Rajai