Starting in 1989, with the death of Imām Khomeini and the election of the new President of the Republic, Hashemi Alī Akbar Rafsanjani, relations with foreign countries seemed to have significantly improved. Rafsanjani, with his government of technicians, sponsored actions both for the pacification of the Middle East region and for the release of Western hostages, held in Lebanon by Shiite groups, favoring the marginalization of radical Islamic currents within the country. A further evolution in the field of international relations was produced by the position of neutrality taken on the occasion of the Gulf War (January-February 1991). The 1992 elections for the renewal of Parliament marked the defeat of the radical candidates of the Khomeinist wing, confirming the victory of the moderate line of gradual opening to the West, pursued by President Rafsanjani, reconfirmed as head of the country in the subsequent presidential elections of 1993. The However, a new phase of detente with Western countries soon suffered an abrupt interruption due to the ban imposed by Iran on US companies from operating in the Iranian oil sector. Accused, moreover, of promoting terrorism and of acquiring nuclear weapons, the Theocratic Republic of Iran was forced to suffer a financial and commercial embargo by the United States (April 1995), which was going to burden even more on the general impoverishment of the Village, already plagued by runaway inflation and rising unemployment. In 1996, despite Rafsanjani attempting to accentuate the moderate character of his politics with the new centrist party, the Servants of the Construction of Iran, and establishing an alliance with the radical left-wing components, the legislative elections once again confirmed the hegemony of the Association of the Fighting Clergy, a movement characterized by a strong pragmatism mixed with sudden flares of religious extremism.
The following year, however, the presidential elections, with the victory of Moḥammad Khatami, a figure of break with the still prevailing Islamic rigorism, marked the beginning of a process of democratization for Iran. Strengthened by a momentarily positive economic trend and a new financial credibility, given by the stability of oil prices on the international market, President Khatami immediately worked for a gradual process of democratic opening, also symbolized by the assignment of the vice-presidency to a woman, Massoumeh Ebtekar. The modernization sponsored by the new president, however, met with strong resistance from the traditionalists who, by controlling the judiciary and having a parliamentary majority, encouraged the populist extremism and found powerful allies in those strata of the population whose interests were harmed by cultural renewal and by slow economic liberalization: hence the exacerbation, between 1998 and 1999, of the phenomena of violence against liberal intellectuals. This, however, only partially affected the popularity of Khatami and his supporters, who were encouraged to continue on the path of cautious reforms also by the birth of the Islamic Participation Front, a political organization independent of the old clerical right and the followers of the former president Rafsanjani according to carswers. As far as foreign policy is concerned, the difficult internal transition had no repercussions on the country’s international orientations: the line of a gradual normalization of relations with the country remained unchanged. West, well received by the United States since 1998, the year in which all anti-Iranian trade sanctions were suspended, while the embargo still remained in force. Another decisive step for Iranian reintegration in the international arena was the improvement of relations with the Arab world. Although in fact conflicts with the United Arab Emirates continued to exist, economic exchanges with the states bordering the Gulf intensified, relations with Egypt and Saudi Arabia were extended. In 2000, despite the continuing obstacles posed by the conservative wing to the government, the reformists also achieved a landslide victory in the legislative elections. Triumph reaffirmed in the 2001 presidential elections, which decreed the re-election of Khatami. Although not yet resolved the basic knots of a country poised between democracy and theocracy, in which the fundamentalism of the Shiites, even if reduced, found an authoritative point of reference in the Ayatollah Alī Khamenei, Khatami and the reformists, therefore, gathered considerable consensus for their modernization policy especially among young people and women.
However, an unsolved problem remained that of the Afghan refugees: the Soviet invasion (1979-1989) and the war that broke out between the various Islamic factions first and the US attack on the Afghanistan then (2001) had in fact caused the exodus to Iran of over one million people, also heavily affecting the country’s economic situation. In 2003, there were numerous protests by students, who protested against conservative hierarchies that hindered reforms. In December of the same year a disastrous earthquake destroyed the city of Bam, causing tens of thousands of deaths and injuries. In February 2004 the legislative elections were held which were won by the conservatives, after the reformists had invited the electorate to abstain, to protest against the management of the electoral campaign by the opponents. In August the parliament, made up mostly of conservatives, rejected a draft law on gender equality proposed by the reforming government. In the meantime, a dispute had begun with Europe and the United States about the country’s nuclear program, which saw an initial solution with the commitment, in November, by the government of Tehran, to suspend uranium enrichment activities, in ‘as part of an agreement with the EU. In the presidential elections of June 2005, the conservative candidate was established Mahmūd Ahmadinejād, former mayor of Tehran; this time too the vote was characterized by the exclusion from the electoral competition of numerous reformist candidates and by the high rate of abstention among reformist voters. The first act of the new government consisted in the resumption of the nuclear program, breaking the agreement with the EU. In April 2006 Ahmadinejād announced that for the first time the uranium enrichment process had been completed, causing concern from the IAEA. and of the international community and leading, in July of the same year, the UN Security Council to give an ultimatum to the Iranian government and to place an embargo on technological, nuclear and missile supplies (2007). In terms of direct relations with the United States, interrupted in 1979, in May 2007 the first official talks between the two countries took place in Baghdad on the subject of the Iraqi crisis, albeit without great progress. In March 2008, conservative parties were winning the elections, but criticism of both the progress and the results came from the opposition and the international community. In June 2013, the presidential elections were held, won in the first round by moderate Hassan Rohani with 50.68% of the votes.