Prior to 2005
Iran has been ruled by an Islamic Republic, since 1980 following the
collapse of the Shah's regime in 1979. The government is based on the concept of
Velayat-e Faqih, which is a system of governance in which a faqih was to serve as the
Supreme Leader. However, following calls that this idea was undemocratic, the system was moderately altered into the current "Islamic Republic", in which a
council of clerics, who are elected by the people, choose the Supreme Leader who, per the constitution, has to be a cleric (though this was altered in 1988). The Supreme Leader, in turn appoints the members of the twelve member
Guardian Council, who approve laws and candidates for elections, even at the presidential level. The President of Iran is not the commander-in-chief, and the control of the military, police, and the parallel
Revolutionary Guards is under the control of the Supreme Leader. The Revolutionary Guards is a constitutionally protected paramilitary force that operates alongside the regular Armed forces, whose primary function is to protect the Islamic Republic. The Revolutionary Guards also have an auxiliary wing called the
Basij, who provide support in enforcing religious laws and suppressing dissidents.
 They are not considered full members of the Revolutionary Guards, and lack the training given to full-time members, although they can be called up at any time to assist the regular forces in times of trouble. Though Ayatollah Khomeini and his successor Ayatollah Khamenei, claimed that this system was democratic and the Revolutionary guards are necessitated to protect the government from military coups and foreign interference, critics contend that this system only serves to keep like-minded conservatives in power and marginalize any opposition, while using the Revolutionary guards to silence any dissidents.
The Islamic Republic has not escaped popular opposition in the past. During the 1980s, the Marxist-Islamist,
Mojahedin Khalq was instrumental in opposing Ayatollah Khomeini through large protests and bombings against politicians such as
Shahid Beheshti, and Khamenei himself, who escaped an assassination attempt that left his right arm paralyzed.
 Following the 1981
Hafte Tir bombing, Ayatollah Khomeini declared the Mojahedin and anyone opposed to the Islamic republic, "enemies of god" and pursued a mass campaign of torture, rape, and execution against members of the Mojahedin,
Tudeh parties as well as their families, close friends, and even anyone who was accused of insufficient Islamic behavior, resulting in the deaths of thousands of Iranians who were usually tried in secret kangaroo courts run by hard line clerics.
 Following the failed
Operation Mersad in 1988, Khomeini
ordered all prisons to execute those still in captivity, resulting in an estimated 30,000 dead. Since then, no organized opposition has surfaced in Iran and following this experience, the Iranian Government usually employs heavy handed tactics to marginalize any attempt at regime removal and usually justifies this with the "enemy of god" classification.
In 1997, following the unexpected victory of a little-known reformist cleric
Mohammad Khatami, there was a revival of a moderate faction within the government whom the public believed had the ability to reform and curb the power of the conservatives and make the system somewhat democratic, and that Khamenei was willing to trust this faction in the hopes that it could recover the country after the eight-year war with Iraq, which Rafsanjani and the conservatives had failed to do.
 However, rather than promoting a reform of the system, the reformists began questioning the concept of the Islamic republic itself and following the exposure of the
murders of dissidents by the intelligence services in reformist newspapers (which were run by former Revolutionary Guards and intelligence agents now turned reformists), the government began to distrust Khatami and his faction, a conflict which reached the breaking point after the 1999
student protests, after which hardliners such as
Mohammad Ali Jafari,
Mohammad Bagher Ghalibaf, and
Qasem Soleimani were promoted to take control of the Revolutionary Guards and the Security Services to crack down on most reformist movements. Despite reformists gaining a majority in the Majlis in 2000 and Khatami winning the 2001 election as well, Khamenei would oppose any attempts at liberalization of the government or society.
 Most Iranians and observers in general have regarded the reform movement to have been a failure with
Saeed Hajjarian, the main theorist behind the movement, declaring in 2003 that "the reform movement is dead. Long live the reform movement".
Ahmadinejad's first term
In 2005, Tehran Mayor
Mahmoud Ahmadinejad was elected to the presidency, defeating now reformist
Ali-Akbar Rafsanjani, placing the conservatives in charge of the government once more. Ahmadinejad would focus his presidency on confronting Israel. His speeches gained international infamy, which usually called for the destruction of Israel and claimed that the
Holocaust was fabricated. The funding of anti-Israeli groups went up exponentially, particularly towards
Hezbollah, which have been labeled as Terrorist groups by the United States. Despite Iran's huge oil and gas reserves, those sectors have been relatively neglected in favor of a nuclear energy program that has cost billions of dollars and has been condemned by Israel and the United States, who claim that the program is a cover up for a much larger nuclear weapons program. As a result, the United Nations has placed sanctions on the Iranian government, which has had a heavy impact on the economy, reducing the value of the rial from a low of 8,000 to the dollar in 2005 to 10,000 to the dollar in 2009.
Iran has been experiencing high birth rates since 1988, both due to an increase in standard of living and government encouragement of large families, with an estimated 60 percent of the country being under the age of 30.
 However, the economy has failed to keep pace with the number of people entering the job market and Iran has been experiencing high unemployment rates since early 2000. Ahmadinejad began a campaign of privatization of state enterprises, but most companies ended up in the hands of government-connected officials and foundations (bonyads) operated by wealthy clerics and the Revolutionary Guards.
 Estimates by the
Los Angeles Times suggest IRGC has ties to over one hundred companies and annual revenue in excess of $12 billion, particularly in construction.
Ministry of Petroleum awarded IRGC billions of dollars in contracts as well as major infrastructure projects.
 Most government-issued contracts were awarded to these companies, and private enterprise in Iran has been struggling heavily against these groups.
election of the president of Iran in 2009 was preceded by
many Iranian surveys and a survey by the US-based Terror Free Tomorrow organization.
 The Terror Free Tomorrow opinion poll, conducted from 11 to 20 May 2009, predicted the high participation and showed similar ratios for the candidates to the later official result, with over a quarter yet undecided.
 The many Iranian surveys show a wide range of differing results. An opinion in the New York Times claims that this is due to the high fluctuation among voters during the campaign season.
The election for presidency took place on 12 June 2009. Unlike the
election in 2005, the 2009 election featured high participation. The results of the elections were announced only 2 hours after the end of the votes, which may seem impossible. The
official results were rejected by all three opposition candidates, who claimed that the votes were manipulated and the election was rigged. The last presidential election had already been
controversial, but this time it escalated. Candidates
Mohsen Rezaee and Mousavi have lodged official complaints. Mousavi announced that he "won't surrender to this manipulation" before lodging an official appeal against the result to the
Guardian Council on 14 June.
According to an analysis by Professor Walter R. Mebane, Jr. from the Department of Statistics of the
University of Michigan, considering data from the first stage of the 2005 presidential election produces results that "give moderately strong support for a diagnosis that the 2009 election was affected by significant fraud".
 The UK-based think-tank Chatham House also suspected fraud in the voting process for a number of reasons:
|More than 100%
||In two Conservative provinces, Mazandaran and Yazd, a turnout of more than 100% was recorded.
||At a provincial level, there is no correlation between the increased turnout, and the swing to Ahmadinejad.
 This challenges the notion that his victory was due to the massive participation of a previously silent Conservative majority.
||In a third of all provinces, the official results would require that Ahmadinejad took not only all former conservative voters, and all former centrist voters, and all new voters, but also took up to 44% of former Reformist voters, despite a decade of conflict between these two groups.
||In 2005, as in 2001 and 1997, conservative candidates, and Ahmadinejad in particular, were markedly unpopular in rural areas. The claim that this year Ahmadinejad swept the board in more rural provinces in 2009 flies in the face of these trends.