For the first time in 24 years, Turkey's AKP lost control of Istanbul. Now, the battle is happening all over again.
It's nearing sundown in one of Istanbul's most popular bar districts, but the streets are unusually quiet.
A short walk away, a few hundred locals are gathered in a park, snacking on sunflower seeds and drinking beer.
That's not an unusual summertime sight in the city's few green spaces, but this time, Istanbulites have come out for more than a sunset picnic.
They have come together around a big screen - not just in this park but in parks, homes and cafes across the city - to watch Turkey's first televised debate in almost two decades.
Despite being plagued with allegations of a sharp democratic decline over the past years, Turkey continues to have a vivid democratic culture and one of the world's highest participation rates for elections.
Turkey's 31 March local elections were no exception to that rule.
What's more, the party's Istanbul mayoral candidate, the hitherto unknown Ekrem Imamoglu, won control over the country's most populous city, Istanbul, beating out former Prime Minister and AKP candidate Binali Yildirim in a razor-thin race.
In the weeks that followed, complaints by the AKP to the country's Supreme Electoral Council (YSK) prompted vote recounts that squeezed Imamoglu’s lead to around 15,000 votes.
After being in office for just 17 days, Imamoglu was unseated as mayor by a YSK decision, prompted by a request from the ruling party, that the March vote be cancelled and run again due to irregularities at the polls.
The key to Turkey
"Whoever rules Istanbul rules Turkey": it's a potent phrase, known to every Turkish citizen and often attributed to President Recep Tayyip Erdogan, who is said to have coined it back in 1994 when he was himself a candidate for the mayorship of Istanbul.
"He is the embodiment of those words, as a quarter century later he is the unchallenged 'ruler' of Turkey," freelance journalist Cagri Ozdemir tells The New Arab.
It was the Istanbul mayoral election that jettisoned Erdogan into power. A man of humble roots - born in a deprived Istanbul neighbourhood as the child of migrants from Turkey's Black Sea coast - Erdogan became prime minister in less than a decade after that vote.
The opposition gaining, and then losing, Turkey's largest city - home to a fifth of its population, and its cultural and economic hub, responsible for half of its exports and 40 percent of its GDP - after 24 years in the grasp of the AKP and its predecessor the Reform Party (RP) is something that has made local elections, often ignored elsewhere, worth discussing.
Allegations that the YSK's decision to annul the vote was directed by the highest levels of government are rife.
Karabekir Akkoyunlu, a visiting scholar at the University of Sao Paulo, claims that if the AKP loses control of Istanbul in the upcoming re-run vote, the party faces more than just a local election defeat - it faces an existential loss as well.
"Losing this cash cow, losing this symbolic city, would really go to the heart of what has made the AKP what it is," he says. "This is why there has been such resistance."
A crucial key to the AKP's longevity lies in municipalities like Istanbul and Ankara, Berk Esen, Assistant Professor of International Relations at Bilkent University, said.
Local municipalities in Turkey are granted a significant amount of fiscal independence and large budgets, with Istanbul's being the greatest at around $6 billion this year.
Critics say the AKP has systematically used municipality budgets to designate contracts for key infrastructure and development projects to friends, family and supporters, a system that has helped them to build a loyal base that now dominates the country's industries. It is also accused of funneling municipal funds into AKP-affiliated foundations.
The "most glitzy" of these projects, Akkoyunlu states, have been taken place in Istanbul.
While some - such as extensions of the metro network - have been hailed by supporters and critics alike, many have come out against big spending on lofty "vanity" projects and "urban renewal" developments that have seen the poor and ethnic minorities made homeless. Those critics see the development that the AKP lauds itself for having brought about as a system of personal enrichment.
"When this kind of budget is in the hands of other people, the whole structure [of the AKP] from top to bottom has a high risk of collapsing," Ozdemir says.
But others believe there was nothing underhand about the decision to cancel the election.
"There is concrete and irrefutable evidence supporting this [decision]," Onur Erim, a policy analyst and advisor to former AKP Ankara Mayor Melih Gokcek, tells The New Arab.
Hazal Duran, a researcher at the Foundation for Political, Economic and Social Research (SETA), explains that the presence of more than 200 ballot box officials - responsible for counting around 42,000 votes - who were not civil servants was against the law. It was legal and sensible, she says, for the YSK to nullify the election if so many votes had come under question.
Erim says that the cancellation, however, needn't have taken place.
"All of this could have been avoided if only the AKP's request for a recount of all votes had not been blocked by the CHP," he says. The party had opposed a request for a total recount, accusing the AKP of trying to obfuscate Imamoglu's victory.
Erim adds that the YSK, by cancelling the election, had given "unfair moral support" to the opposition candidate. A perception of victimhood is seen to have galvanised support for the former mayor among those dissatisfied with the ruling party.
Strength in numbers
"The AKP preserved its votes in its 15th election after it came to power in 2002," Duran says. "It is quite a success for a political party to still be getting 44 percent of the votes after 17 years."
A recent study by an election analyst at the University of Illinois at Chicago, on the other hand, claims that the AKP has, rather than sustaining its vote share over time, continued to lose votes over time.
The March vote, analyst Ali Akarca says, was swayed by the party's alliance with the ultranationalist Nationalist Action Party (MHP). In areas where the two parties competed rather than fielding one alliance candidate (usually from the AKP), the ruling party lost votes.
The CHP's performance in the March elections was also buoyed by an alliance with a nationalist party, the IYI (Good) party.
But its more crucial alliance was an unofficial one, in which the leftist, pro-Kurdish People's Democratic Party (HDP) chose not to field candidates in Istanbul and instead urged supporters to vote "no to fascism" - an implicit but clear signal to choose Imamoglu over Yildirim.
Kurds, Ozdemir says, have been the "kingmakers" in most of Turkey's elections over the past few years.
On the campaign trail for the June vote, Yildirim and the AKP made clear overtures to Kurdish voters.
In early May, Abdullah Ocalan, leader of the outlawed PKK, was allowed to see his lawyers for the first time in eight years - a demand for which thousands of Kurdish politicians, prisoners and activists had been on hunger strike for months.
Days after Selahattin Demirtas, the imprisoned former co-leader of the HDP, expressed support for Imamoglu in the June vote, pro-government media indicated hopes that Ocalan's lawyers would convey a message of neutrality over the elections.
A call for neutrality by Ocalan, long seen as the grand arbiter of Kurdish political decision making, would mean an implicit message of support for Yildirim, critics say.
While Imamoglu spent the Eid holiday campaigning in his native region - the conservative Black Sea area - Yildirim visited Diyarbakir, the cultural and political capital for Kurdish citizens of Turkey.
During that visit, the AKP candidate referred to "Kurdistan" - a common utterance among Kurds worldwide but a controversial one in Turkish politics which can be seen to imply support for a separate, independent Kurdish state - and even greeted supporters in Kurdish.
"In any tight election, the Kurdish vote becomes important," Akkoyunlu explains.
It is not only the HDP who represent Kurdish voters of course. The AKP also gains a significant minority of votes among socially and politically conservative Kurds.
Erim says that many of these voters, however, have gradually fallen out of love with the AKP due to the party's electoral alliance with the ultranationalist MHP. The AKP's nationalist overtures over the past few years may have cost Yildirim votes back in March.
"Now," Erim says. "They are correcting that mistake."
On the warpath
Since The New Arab spoke with Erim, Akkoyunlu and other analysts, the AKP has changed its tune.
While Erdogan had earlier removed himself from the campaign - which some saw as an attempt to shield himself from responsibility if Yildirim were to lose - in the immediate run-up to Sunday's vote, the president has returned to the stage.
In a 180 degree turn from earlier outreach to Kurdish voters, the president slammed Imamoglu, claiming that support for him "comes from either Qandil [the PKK headquarters]; Selo [Demirtas], the former leader of the party who is under the guidance of Qandil, or from abroad".
Erdogan has compared the opposition candidate to the Egyptian president, who came to power through a military coup, saying to supporters: "Will we say Sisi on Sunday, or will we say Yildirim?"
He has also claimed Imamoglu is a member of FETO, or the Fethullah Gulen Terrorist Organisation - Turkey's term for followers of an exiled cleric accused of having led a coup attempt against Erdogan's goverment three years ago - and claimed the CHP "cooperates with terrorist organisations".
Pro-government media has alleged that Imamoglu "cheated" in the televised debate, a claim denied by both the politician and the debate's moderator.
Claims circulated by pro-government media that the CHP candidate insulted the governor of one of Turkey's provinces, also denied by Imamoglu, will now result in legal action.
A court ruling on those accusations, Erdogan said on Wednesday, could "stop Imamoglu".
Interior Minister Suleyman Soylu has also directly accused the CHP of stealing votes.
Who will rule Istanbul?
Duran believes the historic debate may increase votes for Yildirim, whose "successful performance" she says could influence AKP supporters who avoided the polls in March to turn up on Sunday.
Polling firm Mak Danismanlik, however, found that 2 percent more of its respondents had found Imamoglu's performance more successful, with almost two-thirds of respondents who stayed at home on 31 March said they were likely to vote for Imamoglu rather than Yildirim.
"I don't think either candidate managed to score a major victory," Esen says. "In this polarised environment, voters will not change their opinions significantly."
If the vast majority of voters have already made up their minds - and with the margin so slim last time - will Imamoglu become mayor of Istanbul once more?
According to Esen, he will - "and with a larger margin this time", an opinion supported by pollsters.
"With the economy in decline and the AKP candidate unchanged, the ruling party does not have much chance of changing the outcome of the election," he adds. "Provided that the vote count is fair on election night."
Akkoyunlu also warned The New Arab of a "significant possibility" of cheating at the ballot box.
But with Erdogan waging a full-scale discursive assault on Imamoglu, critics now believe that the ruling party is hoping to sway voters through a "smear campaign" rather than by electoral fraud.
While Istanbul might be "too big to lose", it is also too big to cheat, Ozdemir says.
"I honestly believe that Imamoglu will win again, because in a city like Istanbul, the government cannot cheat to influence the ballot box," he explains.
With such a slim margin between the candidates last time, Akkoyunlu says any moves by the AKP - whether attempting to woo the Kurdish vote or attacking the opposition - could be enough to swing the vote.
Erim believes that the AKP's continued popularity is not to be underestimated.
Indeed, while the AKP lost the mayorships of Istanbul, Ankara, Antalya and Adana, the party held on to strong majorities in those city's councils.
"It would be an unfair judgement to analyse the results as an Erdogan and/or AKP rejection," he states. "However, it would be wise to read the actual results as at least a slap on the wrist.
"The current state of the economy has hurt [them]."
Ozdemir disagrees that Yildirim's campaign will motivate AKP supporters who refrained from heading to the polls in March to come forward this time around.
"On the other side of the coin, the opposition is now even more consolidated and willing to stand behind Imamoglu despite their differences," he says.
"But politics is always a gamble.
"Nobody expected a person called Recep Tayyip Erdogan to become the mayor of Istanbul in 1994."
The vote was widely seen as a popularity gauge for Turkey's President Recep Tayyip Erdogan, who has been 16 years in power, variously as prime minister and president.
After decades of limp, uninspired campaigning, Turkey's largest opposition party, the Republican People's Party (CHP), managed to seize the capital Ankara from the control of the ruling Justice and Development Party (AKP).