Nationwide elections were held in Iran on Friday, February 26, for the Majles (Iran’s parliament) and the Assembly of Experts, a constitutional body that appoints the Supreme Leader and can, at least theoretically, fire him as well.

The results for both the Majles and the Assembly have been resounding victories for a coalition between the reformists and the moderate supporters of President Hassan Rouhani, aligned with two former presidents, Akbar Hashemi Rafsanjani and Mohammad Khatami. Together with the independents, the coalition has captured at least 150 out of 290 seats in the Majles, including every single seat for the greater Tehran district, which has thirty representatives in the Majles. In the elections for the Assembly, fifteen out of the coalition’s sixteen candidates running in Tehran Province were elected, including, the first time in the history of the Islamic Republic, a non-cleric candidate, Mohsen Esmaili.

While the victories have been interpreted as a stinging defeat for the conservatives that have controlled the two organs for years, they in fact represent a crushing defeat for Iran’s “deep state,” the secret and semisecret networks of security and intelligence officers and agents in those parts of the government that Supreme Leader Ayatollah Ali Khamenei controls directly. Let me explain.

Over 12,100 people had registered with the Ministry of the Interior to run for the Majles. In Iran’s complex and undemocratic electoral process, the Ministry of the Interior must first certify the eligibility of the candidates. The ministry, which the Rouhani administration controls, approved over 11,300— representing nearly 94 percent of all candidates—with the rest having cases before courts, prior convictions, and so on. The next step was approval from the Guardian Council, another constitutional body that vets the candidates for all elections except those for city councils. It was at this stage that the “deep state” exerted its behind-the-scenes influence and prevented over 50 percent of the candidates from running.

By law, the Council must ask four governmental organizations to check the backgrounds of the candidates. The four are the Ministry of Intelligence, the Office of Chief Prosecutor, the National Organization for Civil Registration (operating as part of the Ministry of the Interior) and the police. Although it was expected that the Council would not allow some of the well-known Reformists who had supported the Green Movement of 2009–11 to run in the election, the disqualification of so many candidates even shocked many conservatives. The reason became clear when Ali Saeedi, Khamenei’s representative to the IRGC and a man who has been part of the security-intelligence establishment since the early 1980s, spoke about the disqualifications.

In a little-noticed press conference on February 16, Saeedi said that the Council had asked the intelligence unit of the IRGC, which he helped found in the early 1980s, to provide them with background information about the candidates. This was, of course, illegal, as the law provides no role for the IRGC in the vetting process. But clearly, the secret information provided by the IRGC intelligence unit had led to the disqualification of thousands of candidates. In other words, although such candidates had seemingly no case before the courts, the police or even the Ministry of Intelligence, secret cases against them did exist before the IRGC intelligence unit, which acts as a “Ministry of Intelligence” for the deep state, parallel to and independent from the Rouhani government’s own ministry.

Despite the setback, the Reformists, moderates and independents put together a coalition and introduced lists of candidates for most districts throughout the nation. In particular, they declared their support for a list of thirty candidates for greater Tehran’s district, and urged the people to vote for the entire list, rather than considering the candidates individually. Some of the Reformist candidates were almost totally unknown. Former president Mahmoud Ahmadinejad referred to them as the “third-rate Reformist candidates.”

But Rafsanjani and Khatami urged the people to vote for the coalition list. Through his family, Mehdi Karroubi, a former speaker of the Majles and a leader in the Green Movement who has been under house arrest for more than five years, announced that he, too, would vote, and urged the people to do likewise. The three daughters of former Prime Minister Mir Hossein Mousavi and his wife Dr. Zahra Rahnavard, the other two leaders of the Green Movement who have also been under house arrest along with Karroubi, announced that they would vote as well. Many political prisoners issued statements, urging the people not to boycott the elections, and instead to vote to throw out the hard-line candidates. A true national movement was born.

Once again, the Iranian people demonstrated their ability for surprising the world. Over 62 percent of eligible voters cast their votes, easily defeating all the hard-line candidates for the greater Tehran district that the “deep state” supported. Mohammad Reza Aref, the first vice president during Khatami’s second term (2001–5), received the highest number of votes in Tehran.

As for the elections for the Assembly of Experts, over eight hundred people had declared their candidacy, but the Guardian Council accepted only 159 for the eighty-eight seats in the Assembly. The Council rejected many of the moderate candidates, who were well-respected and popular clerics. Here, too, the intelligence unit of the IRGC played a leading behind-the-scenes role in preventing many of the progressive and moderate candidates from running, even though they had solid religious credentials.

As I described in an analysis for the National Interest on February 15, Akbar Ganji, an Iranian investigative journalist and human rights advocate living in exile in the United States, published an article a few weeks before the election proposing that voters should try to block the election of three powerful hard-line ayatollahs to the Assembly. The trio are Ahmad Jannati, secretary-general of the Guardian Council; Mohammad Yazdi, current Chairman of the Assembly; and Mohammad Taghi Mesbah-Yazdi, a reactionary cleric who has advocated the use of violence against the opposition. Using the initials of their last names, Ganji called the trio “the JYM triangle” (mosallas-e jim in Farsi). His original article, which was followed by several more as well as interviews with the U.S.-funded Iranian broadcast networks Voice of America and Radio Farda, played a significant role in the rise of the national movement that rallied around the goal of rejecting the JYM trio. Other exiles, including the author, also published articles, strongly supporting Ganji’s proposal and explaining its positive effect on the election and the future of Iran.

Tehran Province has sixteen representatives in the Assembly. Rafsanjani and Khatami published a list of sixteen candidates that they supported for the Assembly, against another hard-liner–backed list that included the JYM trio. Of the sixteen candidates that the ex-presidents supported, fifteen were elected, with Rafsanjani receiving the highest number of votes among all candidates for both the Majles and the Assembly. Yazdi and Mesbah-Yazdi of the JYM triangle were soundly defeated, while Jannati came in sixteenth place. It is widely believed that Jannati was also defeated, but that behind-the-scenes maneuvers prevented the Ministry of the Interior from officially acknowledging it.

The reformist and moderate victories in Tehran are a decisive step in the power struggle between the “deep state” and its opponents, where Tehran is the main “theater.” That is where all the major political factions have their offices, and where most of the state institutions are located. Whoever controls Tehran controls the nation. Thus, the fact that the coalition of the reformists and moderates could get forty-five of their candidates elected, out of the maximum possible of forty-six, is highly significant—and is of symbolic importance as well.

There were other victories for the people, too. At least three other hard-line candidates for the Assembly were defeated. One was Ali Fallahian, a former minister of intelligence in the Rafsanjani administration, who is believed to have been involved in the infamous Chain Murders of 1988–98, when agents of the Ministry of Intelligence murdered dozens of intellectuals and dissidents. Another defeated hard-liner is cleric Ali Razini, a high-ranking judiciary official who played a leading role in the execution of nearly four thousand political prisoners in the summer of 1988. The third defeated hard-liner is cleric Mohammad Saeedi, who had called for most severe punishments for the leaders of the Green Movement, and who was widely ridiculed for his claim that at the moment of his birth Khamenei had cried ya Ali (O Ali, in reference to the Prophet’s cousin and son-in-law, the Shiites’ first imam).

As Ganji pointed out, at least two other hard-liners’ elections to the Assembly are highly suspect. The two are Judiciary Chief Sadegh Larijani and Ahmad Khatami, a Friday prayer imam of Tehran and a current Assembly member. The coalition of reformists and moderates had decisive victories in their districts’ Majles elections. Thus, it defies logic that the same people who had voted for the slate of the reformists and moderates for the Majles would choose to elect two hard-liners for the Assembly.