On June 4, 1988, in a highly dubious situation, Khamenei was appointed as the absolute strongman of the nine-year-old clergy-dominated Islamic Republic of Iran. During a closed session of the body in charge of picking the successor to the founder of the Islamic Republic, Ayatollah Ruhollah Khomeini, the Assembly of Experts (AE), voted for Khamenei to take the helm.
Since Khamenei did not satisfy the constitutional requirement of being a Shi'ite source of emulation, or 'marja' at the time, he was named as the temporary Supreme Leader.
In a video that surfaced during the widespread anti-regime protests in December 2017–January 2018, Khamenei is seen before the AE saying he is not religiously qualified to be the Supreme Leader. Khamenei reiterated that he would only be a "ceremonial leader," and was reassured by the maverick power-broker ayatollah Akbar Hashemi Rafsanjani that the position would be "temporary" until a referendum.
Later, the constitution was amended to remove that requirement, and the Assembly of Experts reconvened on August 6, 1989, and reinstated Khamenei with 60 votes out of 64 present.
Speaking to a periodical, "International Studies" in March 2012, former President Akbar Hashemi Rafsanjani, who played the pivotal role in selecting Khamenei, disclosed that he had written a confidential letter to Khomeini, asking him to tackle "seven crucial issues" before his death.
Rafsanjani described the issues as "bottlenecks" that, if not removed, would be "difficult to pass" after Khomeini's death. These included the Iran-Iraq war raging at the time, relations with Saudi Arabia, which had been severed since 1987 and four internal, political and constitutional issues. The seventh “bottleneck” was relations with the United States.
As Khomeini stopped the Iran-Iraq war and addressed three of the internal issues, Tehran-Washington relations remained as an ulcer, still hurting Iran economically and diplomatically.
Anther unresolved issues was the role of Iran’s judiciary which had evolved into one of the most decisive hurdles for political development in Iran. The other major issue was status and powers of presidents in the Islamic Republic. Almost all presidents under Khamenei's leadership have repeatedly complained about lack of power.
By creating parallel bodies competing with the government's departments in various fields, Khamenei has practically incapacitated the constitutional executive power.
Riyadh-Tehran relations, which have suffered several fluctuations throughout the past four decades, currently are in their worst ever condition. Khamenei not only has failed to balance ties with one of the most powerful countries in the Islamic world but has pushed Tehran-Riyadh relations into a crisis.
Attacking Saudi Arabia's embassy in Tehran and its consulate in the city of Mashhad, and helping Houthi rebels fighting the Saudi-backed local government have deepened the crisis between the rival Shi'ite and Sunni countries.
In the meantime, Iran under Khamenei's leadership has been forced to engage in two more catastrophic wars, the war over the Islamic Republic's nuclear program, and the war with international sanctions imposed on the country. Khamenei has failed to remove international concerns about Iran's nuclear program, and the country has lost billions of dollars for a nuclear program devoid of any benefit.
Through personal meddling, Khamenei has never allowed governments to address the international row over Iran's nuclear program once and for all.
Iran's failure in this matter could be one of the worst legacies Khamenei will leave for his successor(s).
Moreover, Khamenei has militarized Iran's traditional foreign policy and diplomacy. According to Rafsanjani, Tehran’s ambassadors to the Middle Eastern countries are appointed by the Qods Force, leaving very little for the foreign ministry to do in regional diplomacy.
The last, but not the least important issue is Tehran-Washington relations. During three decades of Khamenei's leadership, the problem between the U.S. and Iran has never come close to a solution. Whoever dares to propose a dialogue between the two countries, will be deprived of state positions, or even placed behind bars.
Besides these issues, Khamenei's leadership has also left scars on the domestic politics by eliminating the loyal opposition and allowing the Islamic Revolution Guards Corps to become a lone ranger in the country's economic field. Women, media, ethnic, and religious minorities have also suffered deeply in the past three decades. Baha'is are persecuted across the country. Sunnis cannot have their mosque in the capital city, Tehran.
Nonetheless, Khamenei has kept himself entirely out of reach. It is even next to impossible for those who serve at high state positions to write a personal letter to the Supreme Leader without fear of punishment.
Although Khamenei did not inherit a peaceful establishment from Khomeini, "He added more bottlenecks on the way of managing the ancient country," his once mentor, close friend, and supporter, the late Ayatollah Hashemi Rafsanjani once lamented.