Iran's Supreme Leader Ayatollah Ali Khamenei warned on today that any attempts to disrupt the presidential election on 19 May would be dealt with harshly.
The vote has shaped up to be primarily a contest between incumbent president Hassan Rouhani and rival Ebrahim Raisi, who served in top positions in the judiciary for years.
The election will be held as Rouhani, elected in a landslide in 2013, is coming to the end of his four-year term.
Raisi has the backing of Khamenei, according to analysts.
If people participate with order, behave morally, observe legal and Islamic parameters then this will be a source of honour for the Islamic Republic
Khamenei said, according to the transcript of a speech published on the Supreme Leader's official website.
"But if they break the law, operate in an immoral way, or speak in a way that will encourage enemies, then the elections can be seen as a loss."
Dozens of people were killed and hundreds arrested when widespread protests broke out after a disputed presidential election in 2009, which kept Mahmoud Ahmadinejad in office for a second term, according to human rights groups.
The security of the country must be completely preserved during the election… Anyone who deviates from this path should certainly know that they will be given a slap.
Khamenei said in the speech, which was delivered to an audience that included top commanders from the Revolutionary Guards, the most powerful military and economic force in the country.
If nobody wins more than 50 per cent of the votes cast in the first round on 19 May there will be a run-off a week later.