In fact, as no one had even predicted such a victory for Reformists and moderates, the Principlists are quite shocked. This will allow Rouhani to breathe a sigh of relief as he now has enough supporters in parliament who will help prevent hard-liners from moving against him and his administration. In addition, many of the toughest opponents of Rouhani’s policies in parliament failed in their re-election bids.

The vote results are certainly a big victory for Reformists and Rouhani, and a humiliating defeat for hard-liners, particularly as many of the Reformist candidates, who managed to win despite having no political background, are considered low-level figures. On social media, Reformist supporters made fun of the Principlists , saying the Reformist “under-23 football team” beat the adult conservative national team.

In the capital, the List of Hope surprised everyone as Tehran’s 30 seats in parliament all unprecedentedly went to the Reformists and moderates. The hard-liners failed to win even a single seat. However, Haddad-Adel was close to becoming a member of parliament again — according to the final results, he came 32nd in Tehran.

The one distinguishing characteristic of the Feb. 26 twin elections was the heated war of tickets. Reformists and moderates reached agreement on a coalition and released a single ticket, known as the "List of Hope.” It was headed by former Reformist Vice President Mohammad Reza Aref and backed by moderate Ayatollah Ali Akbar Hashemi Rafsanjani and former Reformist President Mohammad Khatami. Meanwhile, the Principlists put forth a ticket headed by former parliament Speaker Gholam-Ali Haddad-Adel.

TEHRAN, Iran — Finally, Iran’s long-awaited parliamentary and Assembly of Experts elections have been held, and the results suggest that moderate President Hassan Rouhani and the Reformists have once again outmaneuvered the hard-liners.

Despite the big victory of moderates and Reformists in Tehran, the competition in other cities was a draw. No doubt the provincial battle could also have been an outright win for moderates and Reformists had their preferred candidates not been disqualified by the Guardian Council.

Looking at the election results in cities outside Tehran, hard-line newspapers and media outlets have published headlines such as “Iranians voted for Principlists.” They claim that the Principlists have gained the majority of seats in parliament. However, it seems that their way of counting candidates may not be correct, because they are counting many of the moderates — who were (happily) forced to leave the Principlist camp — as their own. Many of the candidates who ran on independent tickets, such as incumbent parliament Speaker Ali Larijani, are moderate Principlists who have been in disagreement with the hard-liners who have come to dominate the Principlist camp, which is one of the reasons why they have avoided the hard-liners’ measures against the Rouhani administration.

In fact, 80 Reformists, 76 Principlists and 60 independent candidates (many of whom are moderates) have found their way into the 290-seat parliament. Competitions for 62 of the seats will be going to a second round, since no candidate in those constituencies managed to secure a quarter of the votes. These runoff elections will also be important for the composition of the next parliament.

Nonetheless, the Reformist-moderate victory could have been bigger. Rafsanjani's son Mehdi Hashemi Rafsanjani said that Minister of Communication and Information Technology Mahmoud Vaezi and government spokesman Mohammad-Bagher Nobakht caused disagreements among moderates and Reformists, leading to a disparity in voting in provincial cities.

In the elections for the Assembly of Experts, the ticket backed by Ali Akbar Hashemi Rafsanjani — known as “the People’s Experts” — triumphed as it gained 52 out of the assembly’s 88 seats. In Tehran, Rafsanjani and the 14 other candidates on his list heavily defeated the Principlists. Two of the most prominent Principlist candidates — incumbent Chairman Ayatollah Mohammad Yazdi and Ayatollah Mohammad Taghi Mesbah Yazdi — were defeated, ranking 17th and 19th, respectively, in the race for Tehran’s 16 seats in the Assembly of Experts. Fellow Principlist Ayatollah Ahmad Jannati survived the tight race for Tehran’s seats, but was close to being eliminated from the assembly since he barely ranked 16th in the capital. However, this success could also have been bigger if Rouhani hadn’t published a separate list of candidates. Considering that Rouhani only came third in Tehran, this perhaps was a signal of a lack of sufficient harmony with Rafsanjani.

Nonetheless, before the elections, some supporters of the moderates were critical of Rafsanjani’s list due to the presence of some Principlists such as Ayatollah Mohammad Ali Movahedi Kermani. However, these supporters were later persuaded that in order to prevent the candidates with the most hard-line views from getting into the Assembly of Experts, the candidates on Rafsanjani’s list for Tehran must all win. To this end, Rafsanjani has been quite successful.

In fact, it seems that the popularity of Rafsanjani, Khatami and Seyyed Hassan Khomeini — the grandson of the founder of the Islamic Republic, Ayatollah Ruhollah Khomeini — very much shaped the results of the elections. Many of those who usually abstain from casting their ballots went to the polls in response to calls by Khatami, Khomeini and Rafsanjani for voters to turn out. The trio’s call on people to vote also helped many of the Reformist candidates — who were largely completely unknown, even to journalists — gain seats in parliament.

The Principlists were burdened by their support for Mahmoud Ahmadinejad in the 2005 and 2009 presidential elections, and the antics the Principlists engaged to strike at their opponents during the campaign should not be ignored. By accusing Rafsanjani and the Reformists of being supported by the British, the hard-liners created a polarized atmosphere.

Abbas Abdi, a political analyst, told the Iranian news outlet Alef, “Principlists made a mistake by branding their rivals as British. … Bringing up this issue made people angry, and if Principlists hadn’t done that, people wouldn’t have voted like this.”

The ultimate outcome of the parliamentary and Assembly of Experts elections is that Rouhani will have better — and most importantly, more relaxed — days in the remaining 15 months of his term, and he owes this relief to Rafsanjani, Khatami and Khomeini.