The 25th general election in the history of the Turkish Republic, it was called on 24 August by President Recep Tayyip Erdoğan after coalition talks between the AKP and opposition parties broke down. This was always a plausible outcome following the surprise results of 8 June, as the three opposition parties who won representation in the Grand National Assembly diverged significantly on key AKP policies, and appeared to immediately rule out any deal with the incumbent government; while leading AKP politicians just as quickly stated their preference for a snap election.

In June, the centre-left Republican People’s Party (Cumhuriyet Halk Partisi, CHP) – the main opposition to the AKP but last in power prior to Turkey’s military coup of 1980 – took 25% of the vote. According to the closed-list proportional representation system which Turkish general elections follow, this was enough for 132 seats compared to the AKP’s 258. Achieving the 10% threshold which parties must reach to gain representation, two other opposition groups won seats: the far-right Nationalist Movement Party (Milliyetçi Hareket Partisi, MHP), who took 16.3% of the vote for 80 seats; and the Peoples’ Democratic Party (Halkların Demokratik Partisi, HDP), anti-nationalist, left-wing, and pro-Kurd, which managed 13.1% of the vote, also for 80 seats.

As it happened, only the CHP proved willing to enter into extensive coalition talks with the AKP. But after ten days of negotiation in August, talks failed, with CHP leader Kemal Kılıçdaroğlu claiming that his party had been offered only a three-month coalition role before early elections, rather than the full four-year parliamentary term they desired. A last-gasp attempt to forge a deal with the MHP led to a string of demands and little progress, so Erdoğan announced his intention to call a snap election on 21 August, before confirming his decision three days later.

As the decision was taken by the President rather than parliament, the CHP argued that it had been made in violation of the Turkish Constitution, suggesting that given the AKP’s inability to conclude a coalition agreement, the mandate should have passed to Kemal Kılıçdaroğlu. Erdoğan summarily dismissed the CHP’s claim. The early election process ought to have meant a power-sharing interim ‘election’ government, but with the CHP and MHP refusing to provide members for such an endeavour, the AKP have retained authority while the role of parliament has diminished: between June and November, the Grand National Assembly was in session for just 33 hours.

The AKP’s relatively poor showing in June came on the back of rising unemployment, stagnating growth, and a string of controversies. The Gezi Park protests began in May 2013 to contest the removal of one of Istanbul’s few central green spaces, but spurred by the heavy-handed response of the police, it became concerned with wider issues: critical of the government’s growing authoritarianism, and of its perceived encroachment upon the Turkish principle of secularism, established in the 1920s by Mustafa Kemal Atatürk, the founder of the Republic. After weeks of confrontation, by August 11 people had died with more than 8,000 injured.

Towards the end of 2013, senior AKP ministers became implicated in an ongoing corruption scandal, accused of bribery. In the meantime public dissatisfaction grew with the government’s role in the Syrian Civil War, with some arguing against any Turkish military intervention, while others accused the government of covertly lending support to ISIS. When, in March 2014, conversations were leaked implicating Erdoğan in the corruption scandal and suggesting that government ministers were planning ‘false flag’ operations in Syria, Erdoğan had the websites of Twitter and then YouTube blocked.

Another crucial topic in the run-up to June’s election was Erdoğan’s call for a switch from a parliamentary to a presidential system. Becoming Prime Minister of Turkey as leader of the AKP in March 2003, in August 2014 Erdoğan won election to serve as Turkey’s President. Ahmet Davutoğlu succeeded him in the roles of AKP leader and Turkish Prime Minister. While the President is meant to remain impartial, seeking to maintain his grip on Turkish politics, Erdoğan has since taken the unusual step of calling cabinet meetings, while pressing the case for the constitutional reform which would give more power to the Presidency. Angering his opponents – and with the construction still subject to the challenge of Turkey’s courts – in October 2014 a $350 million palace on protected forest land in Ankara was reconfigured as an official residence for the new President.

In June the AKP were hoping for 330 seats, which would have allowed them to call a referendum on constitutional reform. With 367 seats – a two-thirds majority – the constitution could have been changed without the need for a referendum. Sunday’s results reassert the AKP as the party of government, but they should hold in check Erdoğan’s immediate ambitions for an enhanced Presidency.

The biggest shift between June and Sunday’s general election has seen a renewed focus on national security. A ceasefire between the Turkish government and the Kurdistan Workers’ Party (PKK) collapsed in July, when the government authorised airstrikes in Syria and Northern Iraq in response to a suicide bombing in the Turkish border district of Suruç. The attack in Suruç killed 33 people and injured more than 100, but the government were accused of stoking violence against the PKK at home and abroad, partly as a way to consolidate their right-wing credentials and to decrease the election turnout in Turkey’s southeastern HDP strongholds.

Then on 10 October, Turkey suffered the deadliest terror attack in its modern history, when two bombs were detonated outside Ankara Central railway station, killing 102 people and injuring over 400. The bombs appeared to target a ‘Labour, Peace, and Democracy’ rally, held largely to protest the growing conflict between the government and the PKK. In response to the bombing, the CHP in particular scaled back their campaign efforts.

Whatever the nature of this increase in violence, the AKP certainly benefitted on Sunday, at the end of a sharply polarising campaign which also brought an apparent increase in press censorship and attacks on opposition headquarters by AKP supporters and Turkish nationalists. The turnaround in the AKP’s fortunes was as much of a surprise as their decline in June: opinion polls had indicated that they would receive around 40-43% of votes.

While the AKP gained 58 seats for their total of 316, the CHP saw a more marginal increase of 2 seats on their result from June, taking 25.4% of the popular vote and 134 seats in all. The HDP and MHP suffered significant losses, although both polled just above the required 10% election threshold. Though they achieved the least share of the vote with 10.7%, the HDP managed 59 seats, a loss of 21. The MHP meanwhile took 11.9% of the vote, which across Turkey’s 85 electoral districts was only enough for 41 seats, a decrease of 39.