As the Khomeinists maneuvered to increasingly encroach upon all facets of state administration and consolidate power, Ali Khamenei’s fervent loyalty to Khomeini and close relationship with Akbar Hashemi Rafsanjani, who was Khomeini’s closest acolyte, began paying dividends. Throughout the 1980s, an extremely bloody decade during which Iran’s revolutionary regime simultaneously faced intensifying domestic strife and a protracted war with neighboring Iraq, Khamenei rose through the ranks and was appointed to several important posts by Khomeini, boosting his public profile and revolutionary bona fides. Still, there was very little indication during the years between the revolution and Khomeini’s death that Khamenei would eventually outmaneuver his allies and rivals to become the Islamic Republic’s most important official.
Khamenei’s first role after the revolution was serving as one of the founders of the Islamic Republican Party. According to his official biography, Khamenei was among those who crafted the platform and manifesto for the party and was the founder of the party’s central committee. He actively communicated the party’s message through speeches and pamphlets and founded a newsletter that served as the party’s mouthpiece.
Soon after the revolution, Khamenei, who had previously been a somewhat atypical cleric involved in intellectual and literary pursuits, began taking an interest and playing an active role in military affairs. His role in security would influence his approach to consolidating power as Supreme Leader, which relied heavily on creating patronage links at all levels of Iran’s military, security, and intelligence apparatuses.
Asserting clerical control over the Islamic Republic’s military and security agencies, which retained vestiges of loyalty to the Shah’s regime, was an ongoing challenge for Khomeini and his followers in the aftermath of the revolution. Accordingly, the Khomeinists applied a two-pronged approach, purging the military from the top down of officers and conscripts with ties to the Shah or who were deemed disloyal to the Islamic Revolution, and simultaneously, reorganizing the military’s command and control structures to ensure clerical oversight over defense policy and planning. The overarching goal of the Khomeinists was to ensure that all facets of state security were in ideological lockstep with the goals and values of the Islamic Revolution.
As the Islamic Revolutionary Council and Islamic Republican Party maneuvered to compete with Bazargan’s provisional government by placing Khomeinists in strategic positions, Khamenei was appointed Deputy for Revolutionary Affairs in the Defense Ministry in late July 1979. Little has been written about his tenure, but based on his title, he was likely engaged in efforts to purge counterrevolutionary elements and sentiment and instill ideological conformity with the aims of the Islamic Revolution in the armed forces. He held the position until the fall of the provisional government on November 6, 1979, just days after the occupation of the U.S. Embassy by radical student followers of Khomeini.
When the siege of the U.S. Embassy occurred, Khamenei was in Mecca experiencing the hajj with Rafsanjani. Rafsanjani’s account of hearing the news shows that neither he nor Khamenei initially supported the embassy takeover. Rafsanjani recounted, “We were surprised because we did not expect such an incident. It was not our policy…It was obvious that neither the Revolutionary Council nor the interim government had any inclination toward such acts.” If Khamenei did have misgivings about the embassy seizure, he chose never to air them publicly, as such a break with Khomeini would have imperiled his political future.
In Khamenei’s recounting, he backed the takeover from the outset as soon as it was clear that the hostage takers were Khomeinists. According to Khamenei, the more liberal members of the Islamic Revolutionary Council feared that America would respond to the hostage crisis in a manner that would topple the revolution. Khamenei consistently defended the actions of the students in deliberations with the Council and gave a speech outside the Embassy compound during the holy month of Muharram in which he noted, “Not only we did not lose anything in this campaign against America, but we gained something, which was giving hope to the people and glorifying the revolution. This helped us elevate the image of Iranians in the world.” Khamenei believed that revolutionary regimes historically suffered from retaining relationships with their former colonial masters. He approved of the embassy takeover, because it severed linkages between Iran and the U.S. After he was chosen as the representative of the Revolutionary Council, Khamenei would defend Iran’s treatment of the hostages and accompany foreign reporters who were permitted to interview the Americans.
In December 1979, Khamenei was appointed as supervisor of the IRGC, a position he held three months before resigning to run in the first majles election. In January 1980, Ayatollah Khomeini issued a decree appointing Khamenei as the Friday prayer leader for Tehran, a position which greatly enhanced his public profile. Friday prayer leaders in cities around Iran were an important force multiplier for Khomeini’s efforts to convey his ideology and strategic positions to his followers as he consolidated power. Giving Khamenei the most prominent Friday prayer leadership showed Khomeini's high regard for his communication skills. According to his official biography, Khamenei came up with the innovation of holding congresses of Friday prayer leaders to ensure that Khomeinist clerics within Iran – and eventually, at Khomeinist institutions outside of Iran’s borders – delivered unified messages each week. A New York Times profile wrote of Khamenei’s tenure as Friday prayer leader, “For more than a year, the slim, intense clergyman delivered fiery sermons before large crowds. He usually spoke with a rifle in his hand, jabbing its muzzle into the air to make his points as he castigated the “Great Satan, America,” the leaders of Iraq and the political foes of Ayatollah Khomeini.”