Religious conservatives said the act insulted Iran’s religious dignity and amounted to “haram” – a term used to describe a religiously forbidden act under Islamic rules.

Mohammad Taghi Rahbar, the Friday prayer leader of Iran’s second city, Isfahan, told Mehr news agency that Mr Ahmadinejad had “lost control”.

He added: “Shaking hands with a non-mahram (unrelated by family) woman, under any circumstances, whether young or old, is not allowed. Hugging or expressing emotions is improper for the dignity of the president of a country like the Islamic Republic of Iran.”