Ten days before historic presidential elections in Turkey, the deputy prime minister has brought to the country’s attention the pressing matter of female modesty. “[A] woman must not act in an alluring manner but must preserve her purity,” said Bülent Arınç, co-founder of the ruling Justice and Development party (AKP) and close ally of the prime minister, Recep Tayyip Erdoğan, who is widely expected to win the election on 10 August.

“[A] woman must not laugh in public … Where are our girls, who blush delicately, lower their heads and turn their eyes away when we look at their faces, our symbols of chastity?”

Arınç was speaking on the subject of Turkey’s “moral collapse” at a meeting to mark the Islamic festival of Eid al-Fitr. His advice became, ironically, the source of much mirth on social media and inspired a flurry of photographs of Turkish women laughing, perhaps through gritted teeth. While Arınç took care to provide advice for men too – “[A] man will not be a womaniser” – his fixation on the behaviour of Turkish women enraged both women and men who are already resentful of the AKP’s moralistic hectoring.

However, despite some outrage, many Turkish voters will applaud Arınç as the voice of reason, his sermon as the tonic Turkey needs. He represents a party that employs Islamic and quasi-Islamic ideals, ever more explicitly and insistently, to appeal to its core base of support among conservative Turks.

The timing of the speech was no coincidence. On 10 August, Turks will for the first time vote directly for their president and the election is effectively a popularity test for Erdoğan, who has been in power for 11 years and is seeking to continue as a self-styled “active” head of state. Erdoğan has long claimed to represent the pious working man of Turkey and has overseen landslide victories for his party in three consecutive general elections. He knows perfectly well that he has alienated the more liberal and secular of Turkish voters with his religious rhetoric but this is now immaterial. The AKP’s aggressive policy of polarisation encourages deep commitment to Erdoğan and creates a stark division within the Turkish population. Almost 50% of Turks vote for Erdoğan: the formula works.

The prime minister has made no secret of where he stands in the debate on women’s role in Turkish society: in 2010, he declared that “women and men are not equal. They only complement each other”. During his election campaign 10 days ago, he visited a dormitory of female university students to warn them not to “hang around” but find husbands as soon as possible.

The two opposition candidates in the presidential race have, less dramatically, supported women’s rights; Selahattin Demirtaş, the candidate of the leftwing People’s Democratic Party, said he regretted the lack of female presidential candidates and discussed the problems of domestic violence in Turkey in his manifesto. The main opposition candidate, Ekmeleddin Ihsanoğlu, responded to Arınç’s comments on public modesty by saying that Turkey needs to hear its women laugh more, not less.

While these views will not get the publicity they deserve, the social media storm created by Arınç’s parochial advice was significant in its breadth and diversity. Some of the women laughing in the photos wore headscarves, others bikinis. Many were joined by male friends and relatives in joyous, immodest selfies. Many of Arınç’s intended audience of conservative Turks will have agreed with him, but by no means all.

On 8 August, women will gather in central Istanbul to take part in a “laughing protest”. While admirable, and surreal, this will be sadly fleeting, like many protests in Turkey. If all the women in the country chose not to vote for Erdoğan he would lose resoundingly, and they would have the last laugh.