In the end, Iran’s May 19 presidential election was an anti-climax. Though a snappy adage calls for “maximum drama, but minimum change” in such ballots, President Hassan Rouhani’s victory in the first round was more decisive than even his supporters had dared hope for. Winning 23.5 million—or about 57 percent—of the 41 million votes cast, Rouhani prevailed over his main challenger, Ebrahim Raisi, the arch-conservative administrator of the Imam Reza Shrine in Mashhad, Iran’s second largest and religiously important city.

The short but intense campaign once again showed that despite stringent political restrictions, lively political discussion is possible in the Islamic Republic. In three live televised debates, in stump speeches delivered to mixed audiences in football stadiums (to which women are typically not permitted), and in street canvassing accompanied by cheerful chants and dances (equally forbidden during normal life), the people of Iran displayed a profound interest in their country’s politics.

The usual shades of grey soon focused on a black and white contest, symbolized by the turbans of the two competing clerics: Rouhani’s white one and Raisi’s black one, the latter indicating that he is a direct descendant of the Prophet Muhammad. Iran’s conservatives accused the government of incompetence, while the technocrats, moderates, and reformists accused hardliners of wanting to return to the years of deprivation and bondage experienced under Rouhani’s predecessor, Mahmoud Ahmadinejad.

Despite Rouhani’s wide-margin win, not all will be rosy—or white, for that matter. For the regime, the 73 percent voter turnout will be deemed a victory for the system itself and thus used for internal consolidation. Securing an additional 5 million votes since his first-term election in 2013 can also be interpreted as a confirmation of Rouhani’s “policy of moderation,” his former slogan. Yet the Iranian president will be able to act only within limits set by the Supreme Leader, Ali Khamenei, and the non-elected institutions he dominates.

If one thinks of Iran’s presidential election not as a free and open expression of opinion but as a carefully managed process of public deliberation, it provides three important clues about the country’s future direction.

First, it was significant that Rouhani was even allowed to run. The country’s Khamenei-controlled Guardian Council vets all candidates before an election and regularly disqualifies a near totality of would-be candidates. This year, only a half-dozen men—including the incumbent and two conservative heavyweights—were hand-picked out of more than 1,600 registrations. Former president Ahmadinejad was barred from entering the race. Voices emanating from the hardline camp alluding to a possible disqualification of Rouhani early in the process appear to have been targeted at reminding him that his room for manoeuvre is limited.

Second, the moderates in particular were given some scope to speak relatively freely to their base. In trying to garner reformists’ votes, Rouhani reinforced the unfulfilled promises of his first campaign. He vowed to free the leaders of the 2009 Green Movement held under house arrest (something over which the president has no control) and outright criticized the Revolutionary Guards for its involvement in politics and suppression of internal freedoms. From a regime perspective, this was permissible in order to bring otherwise disappointed voters to the polling booths to manifest their presumed support of the Islamic Republic.

Third, Rouhani won the presidency, but Raisi won public recognition. While polls conducted from outside the country saw Rouhani clearly in the lead, Iran’s official surveys predicted a tight race. This kept domestic interest in the election high and painted previously little-known Raisi as a respectable contender. Now, Rohuani can continue to govern and Raisi is likely to be given an additional position at the national level to build his credentials as a possible successor to Khamenei.

For most of the international community, this result is also a relief. As much as all candidates had pledged to uphold the 2015 nuclear deal, known as the Joint Comprehensive Plan of Action (JCPOA), a Raisi win—with his anti-Western stance and talk of a “resistance economy”—would have complicated the accord’s implementation. In that sense, the vote was actually a referendum on Iran’s further compliance with the deal. Consequently, EU High Representative Federica Mogherini congratulated Rouhani on his “strong mandate” and outlined the task of the Europeans on Twitter: “#EU ready to continue work for full JCPOA implementation, bilat[eral] engagement, regional peace, and meet expectations of all people in #Iran” (@FedericaMog).

Yet, even with President Rouhani, none of this will be easy. True, he was ready to compromise—with the support of the Supreme Leader—on the country’s nuclear program. But he failed to increase civil liberties in Iran as he had promised to. Moreover, Rouhani has not shown any willingness to reign in Tehran’s regional power play, from supporting Hezbollah in Lebanon to its active fighting role in Syria and Iraq to its more circumscribed assistance to the Houthis in Yemen. Whether the president in fact supports all these endeavours as part of Iran’s regional strategy, or he is simply powerless to change course in a policy area ultimately run by Khamenei and the Revolutionary Guards, is of secondary importance.

The problem for the Europeans is that they want to see the JCPOA fully implemented while increasing EU political and economic engagement with Iran. This has already become harder with the new U.S. administration, which—while not directly scuttling the deal—is willing to explore ways to pressure Iran on the regional front as well as on its missile program that are likely to severely jeopardize it. Whether it is the regular extension of the necessary waivers of U.S. sanctions or new sanctions legislation in Congress, Washington is full of tripwires that could provoke Iran into an escalation.

In fact, U.S. President Donald Trump used his visit to Riyadh, the first stop of his first trip abroad, to form a highly symbolic and financially lucrative new alliance with Saudi Arabia—including securing an arms deal worth nearly $110 billion—that has been widely seen as an anti-Iranian move. If “fighting terror” is going to be the lens through which Trump sees Tehran, then Washington and the Europeans are bound to drift apart again. To prevent any further escalation, the EU and member states need to fully bring their diplomatic resources to this file.