Islamic Republican Party victory
 Political:
 Armed groups:
 Political only:
 Armed groups:
 Separatists:
  Ruhollah Khomeini
 Morteza Motahari †
 Mohammad Beheshti †
 Akbar Hashemi Rafsanjani
 Abulhassan Banisadr
 Mohammad-Ali Rajai †
 Mohammad-Javad Bahonar †
 Ali Khamenei (WIA)
 Mohammad-Reza Mahdavi Kani
 Mir-Hossein Mousavi
 Qasem-Ali Zahirnejad
  Mehdi Bazargan
 Abulhassan Banisadr
 Shapour Bakhtiar
Mohammad Kazem Shariatmadari (POW)
Sadegh Ghotbzadeh 
Karim Sanjabi
Dariush Forouhar (POW)
Kazem Sami
Habibollah Payman
Noureddin Kianouri (POW)
 Akbar Goodarzi †
 Massoud Rajavi
 Mousa Khiabani †
 Ashraf Dehghani
 Mansoor Hekmat
  Rahman Ghasemlou
 Foad Soltani †
 Iranian Armed Forces: Total forces 207,500 (June 1979); 305,000 (peak); 240,000 (final)
 Following the Iranian Revolution, which overthrew the Shah of Iran, in February 1979, Iran was in a "revolutionary crisis mode" from this time until 1982 or 1983 when forces loyal to the revolution's leader, Ayatollah Ruhollah Khomeini, consolidated power.
During this period, Iran's economy and the apparatus of government collapsed; its military and security forces were in disarray.
 Rebellions by Marxist guerrillas and federalist parties against Islamist forces in Khuzistan, Kurdistan, and Gonbad-e Qabus started in April 1979, some of them taking  more than a year to suppress. Concern about breakdown of order was sufficiently high to prompt discussion by the US National Security Advisor Zbigniew Brzezinski over the danger of a Soviet invasion/incursion (the USSR sharing a border with Iran) and whether the US should be prepared to counter it.
 By 1983, Khomeini and his supporters had crushed the rival factions and consolidated power. Elements that played a part in both the crisis and its end were the Iran hostage crisis, the invasion of Iran by Saddam Hussein's Iraq, and the presidency of Abolhassan Banisadr.
 It is generally agreed that while Khomeini had shrewdly assembled and kept together a broad coalition to overthrow the shah, it contained many mutually incompatible elements, "liberals of Mussadeq's old National Front, remnants of the communist Tudeh party, and the 'new left' movements, inspired by similar developments among Palestinian and Latin American youth ...", all of whom who had differences among each other and none of whom were interested in Khomeini's plans for a theocracy.
 Khomeini's particularly contentious plan was for rule of Iran by Islamic jurists (a concept known as Velayat-e faqih), with  himself as leader, a form of government that he had not mentioned in any public statements before taking power, and which it is thought would have been a political deal breaker for liberals, Muslim moderates, and supporters of Ali Shariati.
With the fall of the Shah, the glue that unified the various ideological (religious, liberal, secularist, Marxist, and Communist) and class (bazaari merchant, secular middle class, poor) factions of the revolution—opposed to the Shah—was gone. Different interpretations of the broad goals of the revolution (an end to tyranny, more Islamic and less American and Western influence, more social justice and less inequality) and different interests, vied for influence.
 Some observers believe "what began as an authentic and anti-dictatorial popular revolution based on a broad coalition of all anti-Shah forces was soon transformed into a power-grab" by Islamic fundamentalists, that significant support came from Khomeini's non-theocratic allies who had thought he intended to be more a spiritual guide than a ruler—Khomeini being in his mid-70s, having never held public office, having been out of Iran for more than a decade, and having told questioners things like "the religious dignitaries do not want to rule."
 Another view was that although Khomeini may have needed elements of his broad coalition to overthrow the Shah, in the aftermath he had "overwhelming ideological, political and organizational hegemony," and non-theocratic groups never seriously challenged Khomeini's movement in popular support.
 Still another view, was held by Khomeini supporters (such as Hamid Ansari), who insist that Iranians opposed to the new ruling state were "fifth columnists" led by foreign countries attempting to overthrow the Iranian government.
 Khomeini and his loyalists in the revolutionary organizations prevailed, making use of unwanted allies, (such as Mehdi Bazargan's Provisional Revolutionary Government), and eliminating one-by-one with skillful timing both them and their adversaries from Iran's political stage, and implemented Khomeini's velayat-faqih design for an Islamic Republic led by himself as Supreme Leader.
 The most important bodies of the revolution were the Revolutionary Council, the Revolutionary Guards, Revolutionary Tribunals, Islamic Republican Party, and at the local level revolutionary cells turned local committees (komitehs).
 While the moderate Bazargan and his government (temporarily) reassured the middle class, it became apparent they did not have power over the "Khomeinist" revolutionary bodies, particularly the Revolutionary Council (the "real power" in the revolutionary state) and later the Islamic Republican Party. Inevitably the overlapping authority of the Revolutionary Council (which had the power to pass laws) and Bazargan's government was a source of conflict, despite the fact that both had been approved by and/or put in place by Khomeini.
 This conflict lasted only a few months, however, as the provisional government fell shortly after American Embassy officials were taken hostage on November 4, 1979. Bazargan's resignation was received by Khomeini without complaint, saying "Mr. Bazargan ... was a little tired and preferred to stay on the sidelines for a while." Khomeini later described his appointment of Bazargan as a "mistake".
 The Revolutionary Guard, or Pasdaran-e Enqelab, was established by Khomeini on May 5, 1979, as a counterweight both to the armed groups of the left, and to the Iranian military, which had been part of the Shah's power base. 6,000 persons were initially enlisted and trained, but the guard eventually grew into "a full-scale" military force. It has been described as "without a doubt the strongest institution of the revolution".
 Serving under the Pasdaran were/are the Baseej-e Mostaz'afin ("Oppressed Mobilization"), volunteers originally made up of those too old or young to serve in other bodies. Baseej have also been used to attack demonstrators and newspaper offices that they believe to be enemies of the revolution.
 Another revolutionary organization was the Islamic Republican Party started by Khomeini lieutenant Seyyed Mohammad Hosseini Beheshti in February 1979. Made up of bazaari and political clergy, it worked to establish theocratic government by velayat-e faqih in Iran, outmaneuvering opponents and wielding power on the street through the Hezbollah.
 The first komiteh or Revolutionary Committees "sprang up everywhere" as autonomous organizations in late 1978. After the monarchy fell, the committees grew in number and power but not discipline. In Tehran alone there were 1,500 committees. Komiteh served as "the eyes and ears" of the new government, and are credited by critics with "many arbitrary arrests, executions and confiscations of property".
 Also enforcing the will of the new government were the Hezbollahi (followers of the Party of God), "strong-arm thugs" who attacked demonstrators and offices of newspapers critical of Khomeini.
 Two major political groups formed after the fall of the shah that clashed with pro-Khomeini groups and were eventually suppressed were the National Democratic Front (NDF) and the Muslim People's Republic Party (MPRP). The first was a somewhat more leftist version of the National Front. The MPRP was a competitor to the Islamic Republican Party that, unlike that body, favored pluralism, opposed summary executions and attacks on peaceful demonstrations and was associated with Grand Ayatollah Mohammad Kazem Shariatmadari.
 Armed erstwhile allies of Khomeini included the People's Mujahedin, Fedaian (majority),  Fedaian (minority),  Fedai Guerrillas. They had failed in building a connection with the masses they sought but following release of prisoners and the 1977-8 "revolutionary upsurge", had succeeded in providing the armed muscle to deliver the Shah's "regime its coup de grace" in 1979.
 Marxist guerrillas and federalist parties revolted against Islamist forces in some regions comprising Khuzistan, Kurdistan, and Gonbad-e Qabus. which resulted in fighting between them and the Islamic forces. These revolts began in April 1979 and lasted for several months to more than a year, depending on the region. 
In May 1979, the Furqan Group (Guruh-i Furqan) assassinated an important lieutenant of Khomeini, Morteza Motahhari.
 Recently published documents show that United States was afraid of those revolts. National Security Advisor Zbigniew Brzezinski discussed with his staff about a possible American invasion of Iran by using Turkish bases and territory if the Soviets would decide to repeat the Afghanistan scenario in Iran. (Like Iran, Afghanistan shared a border with the USSR. The Soviets invaded it in 1979 and lost over 14,000 troops before withdrawing ten years later. The Soviets had also occupied northern Iran for over four years during World War II.)
 On March 30 and 31 1979 (Farvardin 10, 11) a referendum was held over whether to replace the monarchy with an "Islamic Republic"—a term not defined on the ballot. Supporting the vote and the change were the Islamic Republican Party, Iran Freedom Movement, National Front, Muslim People's Republic Party, and the Tudeh Party. Urging a boycott were the National Democratic Front, Fadayan, and several Kurdish parties. Khomeini called for a massive turnout, and most Iranians supported the change. Following the vote, the government announced that 98.2% had voted in favor, and Khomeini declaring the result a victory of "the oppressed ... over the arrogant."
 On June 18, 1979, the Freedom Movement released its draft constitution for the Islamic Republic that it had been working on since Khomeini was in exile. It included a Guardian Council to veto un-Islamic legislation, but had no Guardian Jurist Ruler. Leftists found the draft too conservative and in need of major changes, but Khomeini declared it 'correct'. To approve the new constitution a 73-member Assembly of Experts for Constitution was elected that summer. Critics complained that "vote-rigging, violence against undesirable candidates and the dissemination of false information" was used to "produce an assembly overwhelmingly dominated by clergy loyal to Khomeini."
 The Assembly was originally conceived of as a way of expediting the draft constitution so as to prevent leftist alterations. Ironically, Khomeini (and the assembly) now rejected the constitution—its "correctness" notwithstanding—and Khomeini declared that the new government should be based "100% on Islam."
 Between mid-August and mid-November 1979, the Assembly commenced to draw up a new constitution, one leftists (and liberals) found even more objectionable. In addition to President, the Assembly added on a more powerful post of Guardian Jurist Ruler (Supreme Leader) intended for Khomeini, with control of the military and security services, and power to appoint several top government and judicial officials. The power and number of clerics on the Council of Guardians which would vet legislation for Islamic correctness (which had been part of the draft constitution) was increased. The Council was given control over elections for President, Parliament, and the "experts" that elected the Supreme Leader, as well as laws passed by the legislature.
 The new constitution was approved by referendum on December 2 and 3, 1979. It was supported by the Revolutionary Council and other groups, but opposed by some clerics, including Ayatollah Mohammad Kazem Shariatmadari, and by secularists such as the National Front who urged a boycott. Again, over 98% were reported to have voted in favor, but turnout was smaller than for the 11, 12 Farvardin referendum on an Islamic Republic.
 Helping to pass the constitution, suppress moderates, split the opposition, and otherwise radicalize the revolution was the holding of 52 American diplomats hostage for over a year. In late October 1979, the exiled and dying Shah was admitted into the United States for cancer treatment. In Iran there was an immediate outcry and both Khomeini and leftist groups demanding the Shah's return to Iran for trial and execution. On 4 November 1979 youthful Islamists, calling themselves Muslim Student Followers of the Imam's Line, invaded the embassy compound and seized its staff. Revolutionaries were reminded of how 26 years earlier the Shah had fled abroad while the American CIA and British intelligence organized a coup d'état to overthrow his nationalist opponent.
 The holding of hostages was very popular and continued for months even after the death of the Shah. As Banisadr recalls Khomeini explaining to him,
 This action has many benefits. ... This has united our people. Our opponents do not dare act against us. We can put the constitution to the people's vote without difficulty, and carry out presidential and parliamentary elections. With great publicity the students released documents from the American embassy—or "nest of spies"—showing moderate Iranian leaders had met with U.S. officials (similar evidence of high-ranking Islamists having done so did not see the light of day). Among the casualties of the hostage crisis was Prime Minister Bazargan who resigned in November, unable to enforce the government's order to release the hostages. It is from this time that "the term 'liberal' became a pejorative designation for those who questioned the fundamental tendencies of the revolution," according to Hamid Algar, a supporter of Khomeini.
 The prestige of Khomeini and the hostage taking was further enhanced when an American attempt to rescue the hostages failed because of a sand storm, widely believed in Iran to be the result of divine intervention. Another long-term effect of the crisis was harm to the Iranian economy, which was, and continues to be, subject to American economic sanctions.
 In September 1980, Iraq, whose government was Sunni Muslim and Arab nationalist, invaded Shia Muslim Iran in an attempt to seize the oil-rich province of Khuzestan and destroy the revolution in its infancy. In the face of this external threat, Iranians rallied behind their new government. The country was "galvanized" and patriotic fervor helped to stop and reverse the Iraqi advance. By early 1982 Iran had regained almost all the territory lost to the invasion.
 Like the hostage crisis, the war served as an opportunity for the government to strengthen Islamic revolutionary ardor at the expense of its remaining allies-turned-opponents, such as the MEK. The Revolutionary Guard grew in self-confidence and numbers. The revolutionary committees asserted themselves, enforcing blackouts, curfews, and vehicle searches for subversives. Food and fuel rationing cards were distributed at mosques, "providing the authorities with another means for ensuring political conformity." While enormously costly and destructive, the war "rejuvenate[d] the drive for national unity and Islamic revolution" and "inhibited fractious debate and dispute" in Iran.
 In early March 1979, Khomeini announced, "do not use this term, 'democratic.' That is the Western style," giving pro-democracy liberals (and later leftists) a taste of disappointments to come.
 In succession the National Democratic Front was banned in August 1979, the provisional government was disempowered in November, the Muslim People's Republic Party banned in January 1980, the People's Mujahedin of Iran supporters came under attack in February 1980, a purge of universities was begun in March 1980, and leftist Islamist Abolhassan Banisadr was impeached in June 1981.
 Explanations for why the opposition was crushed include its lack of unity. According to Asghar Schirazi, the moderates lacked ambition and were not well organised, while the radicals were "unrealistic" about the conservatism of the Iranian masses and unprepared to work with moderates to fight against theocracy. Moderate Islamists were "credulous and submissive" towards Khomeini.
 Gilles Kepel describes Khomeini's strategy of eliminating erstwhile supporters (first Bazargan and the liberals, finally Bani-Sadr and the Islamist left) as first exposing them to power, then sapping it away through the komitehs, revolutionary guards (IRGC), "and other organs controlled by his networks".
 In April 1979, Ayatollah Mahmoud Taleghani, a supporter of the left, warned against a 'return to despotism'. Revolutionary Guards responded by arresting two of his sons but thousands of his supporters marched in the streets chanting 'Taleghani, you are the soul of the revolution! Down with the reactionaries!' Khomeini summoned Taleghani to Qom where he was given a severe criticism after which the press was called and told by Khomeini: 'Mr. Taleghani is with us and he is sorry for what happened.' Khomeini pointedly did not refer to him as Ayatollah Taleghani.  Taleghani died approximately five months later on 9 September 1979. Two of his sons of claimed that he had been murdered, and others called his death "mysterious". In any case it was "a blow to moderation and progressive thought" in the revolution.
 In mid August 1979, shortly after the election of the constitution-writing Assembly of Experts, several dozen newspapers and magazines opposing Khomeini's idea of Islamic government—theocratic rule by jurists or velayat-e faqih—were shut down under a new press law banning "counter-revolutionary policies and acts." Protests against the press closings were organized by the National Democratic Front (NDF), and tens of thousands massed at the gates of the University of Tehran. Khomeini angrily denounced these protests saying, "we thought we were dealing with human beings. It is evident we are not." He condemned the protesters as
 wild animals. We will not tolerate them any more ... After each revolution several thousand of these corrupt elements are executed in public and burnt and the story is over. They are not allowed to publish newspapers. Hundreds were injured by "rocks, clubs, chains and iron bars" when Hezbollahi attacked the protesters. Before the end of the month a warrant was issued for the arrest of the NDF's leader.
 In December the moderate Islamic party Muslim People's Republican Party (MPRP), and its spiritual leader Mohammad Kazem Shariatmadari had become a new rallying point for Iranians who wanted democracy not theocracy. In early December riots broke out in Shariatmadari's Azeri home region. Members of the MPRP and Shariatmadari's followers in Tabriz took to the streets and seized the television station, using it to "broadcast demands and grievances." The government reacted quickly, sending Revolutionary Guards to retake the TV station, mediators to defuse complaints and staging a massive pro-Khomeini counter-demonstration in Tabriz. The party was suppressed with many of the aides of the elderly Shariatmadari being put under house arrest, two of whom were later executed.
 By the end of 1979, the "secular middle class" and liberals had been vanquished and "the only surviving players on the Iranian political stage were the Islamist intellectuals, the young urban poor, and the devout bourgeoisie", according to Gilles Kepel.
 In January 1980 Abolhassan Banisadr, an "Islamist intellectual" and adviser to Khomeini  was elected president of Iran. Banisadr had helped recruit "nationalists, modernizers, leftists," and others who might never have had anything to do with an Islamic cleric like Khomeini, to Khomeini's ranks. Banisadr was opposed by the more radical Islamic Republic party, who controlled the parliament, having won the first parliamentary election of March–May 1980. Banisadr was compelled to accept an IRP-oriented prime minister, Mohammad-Ali Rajai, he declared "incompetent." Both Banisadr and the IRP were supported by Khomeini, but the IRP were closer to him.
 At the same time, erstwhile revolutionary allies of the Khomeinists—the Islamist modernist group People's Mujahedin of Iran (or MEK)—were being suppressed by Khomeinists. Khomeini attacked the MEK as elteqati (eclectic), contaminated with Gharbzadegi ("the Western plague"), and as monafeqin (hypocrites) and kafer (unbelievers). In February 1980 concentrated attacks by hezbollahi toughs began on the meeting places, bookstores, newsstands of Mujahideen and other leftists. By early 1981, Iranian authorities had closed down MEK offices, outlawed their newspapers, prohibited their demonstrations, and issued arrest warrants for the MEK leaders, forcing the organization go underground once again.
 The next month saw the beginning of the "Iranian Cultural Revolution". Universities, a leftist bastion, were closed for two years to purge them of opponents to theocratic rule. A purge of the state bureaucracy began in July 1980. 20,000 teachers and nearly 8,000 military officers deemed too "Westernized" were dismissed.
 Khomeini sometimes felt the need to use takfir (declaring someone guilty of apostasy from Islam, a capital crime) to deal with his opponents. When leaders of the National Front party called for a demonstration in mid-1981 against a new law on qisas, or traditional Islamic retaliation for a crime, Khomeini threatened its leaders with the death penalty for apostasy "if they did not repent." The leaders of the Freedom Movement of Iran and Banisadr were compelled to make  public apologies on television and radio because they had supported the Front's appeal.
 By March 1981, an attempt by Khomeini to forge a reconciliation between Banisadr and IRP leaders had failed and Banisadr became a rallying point "for all doubters and dissidents" of the theocracy, including the MEK. Three months later Khomeini finally sided with the Islamic Republic party against Banisadr who then issued a call for "resistance to dictatorship". Rallies in favor of Banisadr were suppressed by Hezbollahi, and he was impeached by the Majlis and fled the country in June 1981 with the help of the MEK.
 1982 was the "bloodiest year of the revolution". The Islamic Republic unleashed "an unprecedented reign of terror" against the MEK and any other opposition remaining, shooting demonstrators, including children. In less than six months, 2,665 persons, 90 per cent of whom were MEK members, were executed.  The MEK retaliated with "spectatular" attacks against the IRP. On the 28 June 1981. A bombing of the office of the Islamic Republic Party killed around 70 high-ranking officials, cabinet members and members of parliament, including Mohammad Beheshti, the secretary-general of the party and head of the Islamic Party's judicial system. His successor Mohammad Javad Bahonar was in turn assassinated on September 2. These events and other assassinations weakened the Islamic Party but the hoped-for mass uprising and armed struggle against the Khomeiniists was crushed.   In early 1983, the leaders of the last leftist group to be crushed, the Tudeh party (which had been unswervingly loyal to Khomeini's line until the Iran-Iraq War), were arrested and confessed "Soviet-style" on Iranian television. 
 Gilles Kepel argues while opposition and potential opposition organizations were now vanquished, there remained a large active body to deal with before the regime could be stable. This was a social class rather than an organization -- the mobilized "urban youth and working poor", predominately men. They  had served in support of Khomeini against the shah, against the liberals and others, but their interests were not necessarily the same as his core supporters, and in any case their energy had to be kept directed in the right direction. This was done not with force but with activities and resources, that while also religiously (and patriotically) motivated, served this political role: