AKP's defeat in Istanbul marks a new phase in Turkish politics
Economic discontent probably played a strong part. But long-term prospects for coexistence between the new mayor and central government look questionable.
The loss of Istanbul is a heavy blow to both the prestige and the resources of the AKP which it will find hard to live with. The party’s opponents will be emboldened to try further moves against it, even though there are no elections in Turkey until 2023.
A significant blow
The AKP's defeat opens a new phase in Turkish politics. However this does not - yet - necessarily mean that the party's ascendancy, which until this spring had won every election it contested since 2002, is over.
Some of the triumphalism of opposition supporters, who danced in the streets across the city into the small hours on Sunday evening, could yet turn out to be premature.
The AKP has suffered a significant blow, one it brought onto itself
But the AKP has suffered a significant blow, one it brought onto itself by denouncing its very narrow defeat in the 31 March local elections as a theft and electoral fraud.
Party pundits insisted on a rerun which they ought to have known that the party would be hard pressed to win.
The elections result was a dire rebuff for the ruling party, which had done everything it could to win – including publicly accusing the opposition of cheating in the first round, and even hinting that Imamoglu might actually be Greek not Turkish (because he comes from the Black Sea town of Trabzon where a little village Greek is still spoken), and hinting that a trial and imprisonment might lie ahead.
This last possibility had particular resonance for Turkish President Recep Tayyib Erdogan, who himself once suffered exactly this injustice when he was removed from the mayorship in 1998 and imprisoned on a flimsy pretext.
The AKP campaign also showered the electorate with promises of drastic reductions in the cost of almost all municipal services including water (46 percent reduction) and transport. None of that worked.
The CHP candidate swept victoriously through most of Istanbul, not just outstripping his performance in March but also taking some districts - Uskudar, Fatih, and Eyup - which are well-known AKP bastions. Analysts are still puzzled over how that happened.
Imamoglu has first to prove that he can run a giant metropolis of about 15 million inhabitants and 10 million voters
The bottom line is that the vote means that Istanbul’s 15 million inhabitants have a secularist mayor coming from the political centre and supported by the left for the first time since 1994 when the young Erdogan won the first mayorship.
Until this year, Imamoglu, 49, was mayor of the Istanbul district of Beylikduzu and a completely unknown figure nationally.
He was originally regarded by the left as "AKP lite", because of the way in which he cooperated with private enterprise and urban development, but by being unflappable, modest, and an unflagging supporter of modern notions of diversity and toleration he won hearts and is now among the most famous men in Turkey.
Imamoglu is even regarded by millions of opposition supporters as a likely contender for national leadership. But seeing him in that light is to jump far ahead of the actual story to date in the Turkish political scene.
Imamoglu has first to prove that he can run a giant metropolis of about 15 million inhabitants and 10 million voters. The city council and suburban mayors and councils are unaffected by the election results. This means he will have to somehow work with an AKP majority.
With Istanbul out of its control, the ruling party has lost heavily in terms of business contracts, political patronage, donations, and prestige
But he can count on widespread popular support after his electoral success, something he would not have been able to do had there not been a re-run of the vote.
Though the voter turn-out was only very slightly up, the margin of victory for Imamoglu shot up from just 13,729 in March (after 17 days of recounts had whittled down the margin to an absolute minimum) to 806,426 in so far unofficial results.
This gives Imamoglu 54 percent - a bigger share of the popular vote than any previous mayor of the city. His opponent, the elderly and slow-speaking former prime minister, Binali Yildirim, swiftly conceded victory in what was agreed to be a gentlemanly style.
He had given up the highly honorific position of president of the Grand National Assembly to run twice at President Erdogan's bidding.
In terms of its size, the poll outstripped general elections in several European countries. Of a total of 10.5 million eligible voters, 8.74 million, on a huge turn out of 84.4 percent, cast their votes. Not only did additional voters not turn out for the AKP as asked, but its votes fell by about 200,000 from their level in March.
Second, none of Istanbul’s estimated 1.2 million ethnic Kurdish voters heeded hints that they might be rewarded for switching to the AKP. They seem to have been unconvinced by alleged claims that the jailed PKK chief Ocalan had issued calls to his followers to stay neutral in the vote, in contrast to the line of the leadership of the pro-Kurdish HDP (Peoples Democracy Party), which urged voters to back Imamoglu.
The decisive victory means that the result is more or less unassailable. It will be hard for the AKP to find grounds to overturn it or carry out the pre-election threats to bring proceedings against the new mayor and his party.
But will the AKP be able to coexist with a rival party running Istanbul? Currently it looks almost next to impossible since the AKP has never done so before. The party has vehemently denounced its opponents by alleging links with terrorism and electoral fraud, charges that have been denied by opposition politicians.
Nonetheless, Imamoglu has expressed his desire to work with the government.
With Istanbul out of its control, the ruling party has lost heavily in terms of business contracts, political patronage, donations and prestige.
More generally this could mean that secularism, diversity, and pluralism rather than religious conservatism are currently in the ascendant among voters in the country’s largest and wealthiest metropolis.
In other parts of the country there seem to be similar trends.
The results pose a challenge to which the AKP has previously responded by cracking down on opponents.
Sixteen prisoners accused of alleged responsibility for the Gezi Park protests six years ago went on trial on Monday.
The trial is part of an attempted crackdown to suppress critics, but in the wake of Sunday’s election defeat, heavy sentences will be taken as a signal that compromise is out.
In his first comments after the election, President Erdogan took a conciliatory tone, and was unexpectedly swift to offer his congratulations to Imamoglu in a tweet. The foreign minister, Mevlut Cavusoglu, has done the same, speaking of "democratic maturity" and the need to respect democratic pluralism.
One interpretation is that AKP will, as it did after a partial election defeat in June 2015, now bide its time, and wait for Imamoglu to make a serious misjudgement and the coalition of support around him to break up.
But this period of coexistence is unlikely to prove permanent.
The views expressed in this article belong to the author and do not necessarily reflect the editorial policy of Middle East Eye.