Turkey will soon go to the polls for the fifth time in less than four years. President Recep Tayyip Erdoğan announced them on the same day that parliament extended the national state of emergency for the seventh time since the botched coup attempt of July 2016.

Erdoğan brought these elections forward to June 24 for his own political ends: to pre-empt an expected economic downturn, to take his rivals by surprise, and to ride a surge of nationalism stirred up by the recent military offensive in Afrin, Syria. This will be the first national vote since the controversial constitutional referendum of April 2017, which resulted in a narrow vote to establish a presidential system without any checks and balances. Should Erdoğan win this latest election, he will consolidate his power futher: the office of the prime minister will be abolished and taken over by a powerful executive presidency.

The election is taking place under the state of emergency’s restrictions, which have greatly distorted the campaign – but there are also signs that this time, Erdoğan and his Justice and Development Party (AKP) may find it more difficult to control events thanks to a highly motivated opposition and a lively social media environment.

Predicting the result is difficult, but the deteriorating economy, an unexpected alliance among four opposition parties, and the energy brought by the candidacy of Republican People’s Party’s Muharrem Ince undoubtedly will make life difficult for AKP.

Could Erdoğan ever be beaten? Perhaps – but if only there were a fair election campaign. Instead, the election is taking place under Turkey’s state of emergency, which compromises democratic freedoms and the rule of law.

Before the state of emergency was imposed, the High Electoral Board could penalise TV stations that failed to give opposition parties fair airtime. That provision has now been revoked, and the consequences are already visible: according to a recent report, TRT Haber, the publicly-owned and financed national broadcaster, has covered the AKP-Nationalist Movement Party alliance for 37 hours and 40 minutes, and allotted all opposition parties and their presidential candidates a combined 3 hours and 13 minutes. And to make matters worse, in March 2018, one of Turkey’s leading media groups, Dogan Media, was sold to a pro-government Turkish conglomerate.

This is all forcing the opposition to take its campaign elsewhere – and in particular, to social media.

Intimidation and resistance

None of the parties has done so more effectively than the pro-Kurdish Peoples’ Democratic Party (HDP) and its imprisoned former co-leader, Selahattin Demirtaş. In the face of a de facto embargo by mainstream news sources, the HDP depends on social media to announce its parliamentary candidates, to mobilise supporters for its rallies, and to share its policy positions. The internet and the social media in particular also provide a space for many well-known journalists who’ve lost their jobs for criticising the government. They are launching new online newspapers and TV channels to provide alternative sources of information.

Meanwhile, everyday Turks are making a noise on their own, and using Erdoğan’s words against him. The president himself declared a few weeks before the vote that if the nation one day said “tamam” – meaning “done” or “enough” – he would step aside. Seizing upon this statement, the hashtag #TAMAM has been tweeted almost 2m times in various creative ways. The campaign has revived the spirit of the 2013 Gezi Park protests – the biggest popular challenge to the AKP’s rule to this day.

Obviously, a single hashtag campaign is hardly a reliable measure of national opinion, especially considering that only 20% of the population uses Twitter. But in a country where thousands have been prosecuted for their social media posts, such a visible public campaign may be a harbinger of change.

Civic groups are also using social media platforms to recruit and train volunteers to increase electoral turnout and transparency in vote counting. These volunteers could be critical on polling day; recent changes in electoral law have introduced some controversial measures, such as allowing security forces to attend polling stations if they are invited by a voter. Clearly this provision can be abused to intimidate voters, especially in Turkey’s predominantly Kurdish south-east – and all experts agree that the size of the Kurdish vote will be crucial in determining the fate of Erdoğan and his party.

In fact, a recently leaked video shows Erdoğan instructing AKP’s local organisations to put “tight marking” on voters in every district in Istanbul to push the HDP below the national 10% threshold. The national threshold is the highest in the world, and has been criticised for many years for disenfranchising millions of voters, as happened most dramatically in 2002.

The online battle

Turning to social media is not without its risks. Since the 2016 coup attempt, Turkey has arrested thousands of people for allegedly supporting terrorism or insulting government officials on social media. According to the Turkish Interior Ministry, between January 20 and February 26 2018, authorities detained 648 people over social media posts criticising Turkey’s military operations in Afrin.

But Erdoğan’s distaste for social media dates back to the 2013 Gezi Park protests, when Twitter and other social media platforms were used extensively to bring people into the streets. Realising the potential of these platforms to disseminate information and enable collective action, he decried Twitter at the time as the “worst menace to society”, and in March 2014, Twitter was temporarily blocked in Turkey altogether.

But technology has also come to Erdoğan’s rescue before. During the failed coup in 2016, he gave an interview via FaceTime to CNNTurk and called on the people of Turkey to take to the streets against the apparent putsch. Through this last-ditch call and harnessing social media, messaging services, as well as the creative use of mosques calling people on to the streets, he survived the night and continued consolidating his power.

Should an opposition candidate somehow defeat him, Erdoğan might well try to mobilise his supporters to delegitimise the election result. If he does, technology will certainly be one of his most important tools. But equally, all the major challenges to his rule in the last few years relied on social media to some extent. Each time, Erdoğan has managed to take control of the information environment and repel his rivals, tightening control on internet users, blocking social media platforms, harassing bloggers, and manipulating online discussions. But the internet still offers some hope – and this election will be a crucial test of its power to challenge Erdoğan’s authoritarian rule.