The Commander Who Escaped the Firing Squad: How Iran's Top General Survived an Execution Order and Rose to Power

A senior Iranian general once condemned to death now advises the Supreme Leader on military affairs.

Blog Image
Blog Image
Blog Image

Summary

In the final days of the Iran-Iraq War, as tens of thousands of Iranian soldiers fell in catastrophic defeats, Supreme Leader Ruhollah Khomeini issued an extraordinary decree: establish special military tribunals to execute commanders responsible for the bloodshed. Among those facing the firing squad was Yahya Rahim Safavi, a senior Revolutionary Guards officer blamed for abandoning the strategic al-Faw Peninsula before its fall to Iraqi forces. Yet Safavi never faced execution. Through a combination of political intervention, fortuitous timing, and the transformation of Iran's power structure after Khomeini's death, he not only survived but ascended to command the entire Revolutionary Guards. Today, he serves as senior military advisor to Supreme Leader Ali Khamenei. His trajectory from condemned officer to regime insider reveals the mechanics of impunity that have defined the Islamic Republic for more than four decades, and exposes how the Revolutionary Guards evolved from a demoralized, near-disbanded force into the dominant power center in Iranian politics, economics, and security.

The Catastrophe That Demanded Accountability

The spring of 1988 marked the nadir of Iran's eight-year war with Iraq. After initial Iranian victories had driven Iraqi forces from occupied territory by 1982, Khomeini rejected calls for a ceasefire and ordered the war to continue into Iraq itself, seeking to topple Saddam Hussein's government and export the Islamic Revolution. The decision proved disastrous. Over six more years, hundreds of thousands of young Iranians, many of them teenage volunteers from the Basij militia, were sent in human wave attacks against entrenched Iraqi positions fortified with chemical weapons and modern artillery.

By 1987, the tide had turned decisively against Iran. Operation Karbala-4, launched in December 1986, sent 100,000 Iranian volunteers across a temporary bridge spanning the Shatt al-Arab waterway toward Iraqi positions near Basra. Iraqi forces, dug into five defensive rings supported by chemical weapons, radar-guided artillery, and attack helicopters, inflicted approximately 60,000 Iranian casualties against 9,500 of their own. The following month, Operation Karbala-5 attempted to breach Basra's defenses directly. In ferocious fighting that lasted weeks, roughly 50,000 Iranians and 10,000 Iraqis became casualties, yet Iranian forces failed to achieve their objective.

The most humiliating blow came on April 17, 1988. Iraqi forces, restructured and re-equipped with massive Western and Arab support, launched Operation Ramadan Mubarak to recapture the al-Faw Peninsula, which Iranian forces had seized two years earlier in one of their most celebrated operations. The Iraqis concentrated over 100,000 troops from the elite Republican Guard against 15,000 Iranian Basij volunteers. Using extensive chemical weapons to break Iranian defenses, Iraqi forces recaptured the entire peninsula in just 35 hours. Iranian casualties exceeded 1,000 killed and 22,000 wounded. Much of Iran's military equipment fell intact into Iraqi hands. More devastating than the material losses was the psychological impact: the strategic position Iran had held for two years, fortified at enormous cost, collapsed in a day and a half.

The al-Faw disaster exposed catastrophic failures in Iranian military leadership. According to multiple accounts from Iranian officials, senior Revolutionary Guards commanders, including Yahya Rahim Safavi, then serving as deputy commander of IRGC ground forces, were not even present at al-Faw when the Iraqi assault began. Instead, they had traveled to Kermanshah in western Iran to campaign for upcoming parliamentary elections, seeking to install their allies in the legislature. Hassan Rouhani, who in 1988 served as deputy to the commander-in-chief of the armed forces, later recounted that when news reached IRGC headquarters that al-Faw was under massive attack, the commander-in-chief Mohsen Rezaei dismissed the threat, insisting that al-Faw could not fall unless Iraq used an atomic bomb. The remark captured how profoundly out of touch the IRGC leadership had become with battlefield realities.

Safavi's role in the al-Faw debacle became particularly controversial. Akbar Hashemi Rafsanjani, who served as speaker of parliament and de facto commander of the war effort, later stated that Safavi "left al-Faw behind with all the facilities and equipment we had there. He fled across the bridge that we had earned with our blood, and he left it for the enemy." Other commanders subsequently argued that the responsibility lay higher up the chain of command, but Safavi's name remained attached to the defeat.

The string of military catastrophes in early 1988, culminating in Iraq's recapture of all its lost territory and successful counter-offensives into Iran, finally forced Khomeini to accept United Nations Security Council Resolution 598 on July 20, 1988. In a nationally broadcast statement, Khomeini described accepting the ceasefire as "more deadly than drinking from a poisoned chalice," acknowledging the war he had prolonged had ended in effective defeat. The decision enraged him, and he sought to assign blame.

The Death Decree

Four days after accepting the ceasefire, on July 24, 1988, Khomeini dispatched a formal letter to Ali Razini, head of the Judicial Organization of the Armed Forces. The decree was unambiguous: establish special courts to prosecute war crimes "in all war zones" and ensure that "any act that may lead to the failure of the Islamic front is punished to death." The order explicitly instructed tribunals to disregard "rules and regulations that can be restrictive and troublesome," meaning established legal procedures were to be abandoned in favor of revolutionary justice.

The timing and targets of the decree were clear. Khomeini had received a secret report from IRGC Commander Mohsen Rezaei describing the military's desperate condition and its inability to continue fighting without a massive influx of advanced weaponry, including, according to some accounts, nuclear weapons. The supreme leader had also been informed of the specific failures at al-Faw, the Majnoon Islands, and other fronts where command incompetence had led to mass casualties.

On July 25, 1988, in a meeting with senior officials, Khomeini referred to Rezaei's letter and described its contents as "shocking." He stated that military officials had acknowledged the Islamic forces could not achieve victory in the foreseeable future, given the massive disparity in weapons supplied to Iraq by "the arrogance of the East and the West." His fury at the commanders who had assured him of imminent victory yet led Iran to this point was palpable.

According to Rafsanjani's subsequent account, at least three senior IRGC commanders were slated for trial and possible execution under Khomeini's decree: Yahya Rahim Safavi, Gholamali Rashid, and potentially Mohsen Rezaei himself. Another commander, Ismail Kousari, commander of the 27th Division, was executed for abandoning his position after the ceasefire. But the fate of the most senior officers hung in the balance.

Rafsanjani described traveling to the southern front shortly after the al-Faw collapse. There he encountered Sadegh Khalkhali, the notorious "hanging judge" who had overseen summary executions of hundreds of officials and dissidents in the revolution's early days. Khalkhali, according to Rafsanjani, declared that he was prepared to execute multiple IRGC commanders for their responsibility in the al-Faw disaster and the massive casualties inflicted on Iranian forces. "He was ready to hang them," Rafsanjani later stated. But Rafsanjani intervened. Though he did not explain his reasoning in detail, he made clear that he persuaded Khalkhali and other judicial officials to hold off on executing the senior commanders, arguing that such drastic measures would further destabilize the military and the country in a moment of crisis.

The Reprieve

Several factors converged to save the condemned commanders. First, Operation Mersad, launched by the Mojahedin-e-Khalq on July 26, 1988, diverted the regime's attention. The MEK, an armed opposition group that had allied with Iraq, invaded western Iran with approximately 7,000 fighters, heavy weaponry supplied by Baghdad, and Iraqi air support. The MEK aimed to capture key cities and spark an uprising against the Islamic Republic. Though Iranian forces crushed the invasion within days, inflicting heavy losses on the MEK, the operation triggered a far bloodier response.

Khomeini issued a separate fatwa ordering the execution of all MEK prisoners who refused to renounce the organization. Three-member "Death Commissions," consisting of a judge, a prosecutor, and a Ministry of Intelligence representative, were established in prisons across Iran. Over the following months, between 4,500 and 30,000 political prisoners, according to various estimates, were executed after perfunctory interrogations lasting minutes. The massacre consumed the regime's attention and judicial apparatus throughout the late summer and fall of 1988. The planned military tribunals for IRGC commanders were postponed.

Second, Khomeini's health deteriorated rapidly. By early 1989, it became clear he was dying. The regime focused on managing the succession crisis and ensuring continuity of power. On June 3, 1989, Khomeini died. The Assembly of Experts quickly elevated Ali Khamenei, then president, to the position of supreme leader despite his relatively junior clerical rank. The move was orchestrated largely by Rafsanjani, who calculated that Khamenei, lacking Khomeini's religious authority and popular legitimacy, would be dependent on political allies and thus easier to work with.

Third, and most decisively, Khamenei made protection and empowerment of the Revolutionary Guards the cornerstone of his strategy to consolidate power. In the final year of Khomeini's life, a high-level committee chaired by Rafsanjani had been tasked with merging the IRGC into the regular army, effectively dissolving the Guards as an independent force. The plan reflected widespread criticism of the IRGC's battlefield performance and concerns about its growing political ambitions. But within days of assuming the supreme leadership, Khamenei issued a directive canceling the merger. "The army and IRGC are two armed wings of the revolution and the system of the Islamic Republic," he declared, "and they must remain so."

The decision astonished many, including regular army commanders who had expected the IRGC to be subordinated to their control. But Khamenei understood that his own position was precarious. He lacked the religious credentials of his predecessor, and many senior clerics had opposed his elevation. The IRGC, by contrast, was institutionally loyal to the concept of the supreme leader and had no independent power base. Khamenei calculated that by protecting and empowering the Guards, he would secure their allegiance and create a military-security force beholden directly to him.

Ascent Under a New Patron

The cancellation of the merger plan initiated a series of measures that transformed the Revolutionary Guards from a demoralized force on the edge of dissolution into the dominant institution in Iranian politics. Khamenei authorized the IRGC to retain heavy weaponry, including advanced tanks and artillery, that the merger plan would have transferred to the regular army. He granted the IRGC control over all ballistic missiles with ranges up to 2,000 kilometers, while the regular army was restricted to shorter-range systems. He assigned responsibility for internal security entirely to the Guards, giving them a domestic control mission the regular army did not possess. He divided Iran's territorial waters, granting the strategically vital Persian Gulf to the IRGC Navy while the regular navy received the Caspian Sea and Gulf of Oman. Most importantly, he assumed personal command of the armed forces, transferring the "commander-in-chief" title from Rafsanjani to himself, and made clear that the IRGC reported directly to his office.

In this environment, the commanders who had faced potential execution in 1988 found themselves not only pardoned but promoted. Mohsen Rezaei remained IRGC commander-in-chief until 1997. When he finally stepped down, recommending Ali Shamkhani or Gholamali Rashid as his successors, Khamenei overruled him and appointed Yahya Rahim Safavi, the officer who had abandoned al-Faw, as the new commander.

The appointment sent a clear signal. Competence and battlefield performance were not the primary criteria for advancement. Loyalty to Khamenei and the system of velayat-e-faqih, rule by the supreme jurisprudent, mattered most. Safavi's decade-long tenure as IRGC commander-in-chief, from 1997 to 2007, coincided with the presidency of Mohammad Khatami, a reformist who sought to open Iranian society and reduce the security services' power. Safavi became Khamenei's instrument for thwarting Khatami's agenda.

In 1999, when university students staged large protests demanding political freedoms, Safavi deployed IRGC forces and Basij militia to crush the demonstrations. According to his own later account, President Khatami and the interior minister refused to authorize the crackdown, but Safavi appealed directly to Khamenei through Hassan Rouhani, then secretary of the Supreme National Security Council, and received approval within hours. IRGC and Basij forces raided Tehran University dormitories, beating students and making mass arrests. The crackdown marked a turning point, demonstrating that the IRGC answered to Khamenei, not the elected president.

During Safavi's tenure, the IRGC also began its transformation into an economic powerhouse. Safavi appointed rising commanders to key positions. In 1997, he selected Qassem Soleimani, then a relatively obscure officer, to lead the Quds Force, the IRGC's external operations and intelligence arm. Soleimani would go on to become one of the most powerful figures in the Middle East before his assassination by the United States in 2020. Safavi also promoted Mohammad Bagher Ghalibaf to command the IRGC Air Force and Ahmad Kazemi to lead the ground forces. Both would later hold senior government positions.

When Safavi stepped down in 2007, Khamenei appointed him senior military advisor, a position he holds to this day. The trajectory was complete. The officer condemned to execution in 1988 for military failure had become one of the supreme leader's closest confidants.

The Economic Dimension

The protection Khamenei extended to the IRGC was not purely political. It included active promotion of the Guards' economic interests. Article 147 of Iran's constitution permits the armed forces to engage in commercial activities, and the IRGC had maintained some economic enterprises since the war years. But under Khamenei, and particularly during the presidency of Mahmoud Ahmadinejad from 2005 to 2013, the IRGC's economic role expanded exponentially.

The central vehicle for this expansion was Khatam al-Anbia, the IRGC's engineering and construction subsidiary. Originally created to manage post-war reconstruction, Khatam al-Anbia grew into Iran's largest contractor. By 2007, it controlled 812 subsidiary corporations and claimed to have completed 1,500 projects. During the Ahmadinejad years, the government awarded Khatam al-Anbia massive no-bid contracts for oil and gas infrastructure, pipelines, roads, dams, and urban development. International sanctions, which drove foreign companies out of Iran, created opportunities for IRGC-linked firms to dominate sectors previously served by multinational corporations.

Beyond construction, the IRGC expanded into banking, telecommunications, manufacturing, and import-export operations. The Mehr Credit Union, the IRGC's financial arm, engaged in large-scale trade and money-moving operations. When the Ahmadinejad government privatized state-owned enterprises, IRGC-affiliated investment funds received preferential access to purchase the assets. State banks, under government pressure, extended favorable loans to IRGC companies. Analysts estimated that by the end of Ahmadinejad's presidency, the IRGC controlled between one-third and one-half of the Iranian economy, generating billions of dollars in revenue that flowed outside formal government budgets.

Rafsanjani, who had saved Safavi and other commanders from execution in 1988 and then helped elevate Khamenei to supreme leader in 1989, later expressed bitter regret. He acknowledged that he had made a "fatal mistake" by ceding control of the IRGC and intelligence services to Khamenei during his own presidency in the 1990s. "Gradually, the Revolutionary Guards became very rich and powerful," he admitted. By the time he recognized the danger, it was too late. The IRGC had become a state within the state, accountable to Khamenei alone.

Teaching the Next Generation

Today, Yahya Rahim Safavi holds multiple roles. As senior military advisor to Khamenei, he participates in strategic decision-making at the highest level. He serves on advisory bodies that shape Iran's defense and foreign policy. He also teaches at DAFOOS, the joint Command and Staff University that trains mid-level and senior officers from both the IRGC and the regular army. The institution, formerly known as War University, requires all officers seeking promotion to Major and above to complete its courses.

Safavi's teaching reveals much about the ideological foundations of the Islamic Republic's military. In recordings from his lectures, he recounts not battlefield tactics or strategic doctrine, but religious parables. In one widely circulated clip, he describes bringing his infant grandson, who was suffering from jaundice, to a prayer session led by Khamenei. According to Safavi's account, Khamenei blessed sugar cubes by reciting Quranic verses over them, breathed on them, placed one in his own mouth, and then gave the rest to Safavi. After the child consumed the blessed sugar, Safavi claims, the jaundice disappeared within days, baffling the doctors. "There are things that we do not know," Safavi tells his students, implying divine intervention through the supreme leader.

The anecdote is not incidental. It reflects the culture of personality cult and religious charisma that surrounds Khamenei within the IRGC. Officers are taught not merely to obey the supreme leader as a political authority, but to revere him as a figure of spiritual power. This ideological indoctrination, combined with the IRGC's economic interests and institutional privileges, has created a military force whose primary loyalty is not to the nation or the constitution, but to the person of the supreme leader.

The International Reckoning

Safavi's survival and rise have not insulated him from international accountability. In November 2022, Canada imposed sanctions on him personally, citing "flagrant human rights violations" and his role in supplying drones to Russia for use in the invasion of Ukraine. The sanctions followed widespread evidence that Iran had transferred hundreds of Shahed kamikaze drones to Russian forces, which deployed them against Ukrainian cities and infrastructure. Safavi publicly boasted that 22 countries had expressed interest in purchasing Iranian military drones, and Khamenei tweeted mockingly about Western fears of Iranian drone technology. The European Union, the United Kingdom, and the United States imposed similar sanctions on other Iranian commanders and defense companies involved in the drone transfers.

The drone sales to Russia are part of a broader pattern. Under Safavi's watch and guidance, Iran has expanded its military reach across the Middle East, arming and training militias in Iraq, Syria, Lebanon, Yemen, and the Palestinian territories. The Quds Force, which Safavi appointed Soleimani to lead in 1997, became the primary vehicle for these operations. Western governments accuse Iran of facilitating attacks on American forces, Israeli targets, and Arab states, all coordinated through networks the IRGC built and Safavi helped oversee.

Yet Safavi remains beyond the reach of international law, protected by his position within the Iranian system and by Khamenei's patronage. The man who faced execution for military incompetence in 1988 now directs operations that destabilize entire regions.

What the Case Reveals

The trajectory of Yahya Rahim Safavi is not merely a story of one officer's survival and advancement. It is a lens through which to understand how the Islamic Republic functions, how power is exercised, and how accountability is evaded. Several patterns emerge from his case.

First, military failure is not disqualifying if accompanied by ideological loyalty. Safavi's role in the catastrophic losses of 1988 should have ended his career. Instead, his demonstrated commitment to the system of velayat-e-faqih and his utility to Khamenei outweighed his battlefield record. The Islamic Republic prioritizes political reliability over professional competence, a principle that extends from the military through the entire state apparatus.

Second, the institutions designed to enforce accountability, such as the military tribunals Khomeini ordered in 1988, can be suspended or ignored when politically inconvenient. The Islamic Republic presents itself as a system governed by Islamic law and revolutionary principles, but in practice, the supreme leader's political calculations override formal legal structures. Khomeini's decree to execute commanders responsible for military disasters was never implemented, not because the commanders were exonerated, but because circumstances changed and powerful figures intervened.

Third, the IRGC's transformation from a military force on the brink of dissolution in 1989 to the dominant power center today was a deliberate political project, engineered by Khamenei to secure his own position. The decision to cancel the merger with the regular army, to grant the IRGC expanded responsibilities and resources, and to encourage its economic activities all reflected Khamenei's strategy of building a loyal institutional base. The IRGC's current power is not an accident or the result of bureaucratic drift. It is the outcome of calculated decisions made at the highest level.

Fourth, the symbiotic relationship between Khamenei and the IRGC has created a structure of mutual dependency that reinforces authoritarianism. Khamenei relies on the IRGC to suppress dissent, project power abroad, and counterbalance elected institutions. The IRGC relies on Khamenei to provide political cover, legal immunity, and economic opportunities. Neither side can easily break free. Safavi and officers like him are the human embodiment of this arrangement, men who owe their positions entirely to the supreme leader's favor and who therefore have every incentive to defend his authority.

Fifth, the case illustrates the consequences of impunity. Safavi was never held accountable for the failures and casualties of 1988. Instead, he was promoted and empowered. The lack of consequences for incompetence and recklessness at the top levels of the Iranian system has fostered a culture in which similar failures, whether military, economic, or humanitarian, are repeated without meaningful reform. When commanders know they will not be punished for errors, and may even be rewarded if they remain loyal, there is little incentive to change behavior.

The broader implications extend beyond Iran. The IRGC's activities, directed in part by figures like Safavi, have fueled conflicts in Syria, Iraq, Lebanon, Yemen, and now Ukraine. The organization that nearly faced dissolution in 1989 has become a destabilizing force across multiple regions, armed with ballistic missiles, drones, cyber capabilities, and a vast network of proxy forces. Its commanders, who should have been held to account for battlefield failures decades ago, now operate with near-total impunity, insulated by their relationship with the supreme leader and by the power they have accumulated.

The story of Yahya Rahim Safavi is, ultimately, a story about systems that prioritize loyalty over competence, politics over law, and power over accountability. It is a story about how narrow institutional interests can override national welfare, and how individuals who escape justice at critical moments can go on to shape the fate of nations. It is a reminder that impunity, once established, tends to expand and perpetuate itself, and that the failure to hold powerful figures accountable in one moment creates conditions for far greater abuses in the future.

Explore Topics

Icon

0%

Explore Topics

Icon

0%

Brand Logo

© 2026 IranLeaks. All rights reserved

Brand Logo

© 2026 IranLeaks. All rights reserved

Brand Logo

© 2026 IranLeaks. All rights reserved