Istanbul re-run is a risky strategy for Erdogan
Late into the night, across Istanbul, there was the sound of defiance: pots and pans banged repeatedly, in a very Turkish style of protest.
Videos shared on social media showed the same scene in several areas of the city, after the supreme election council took the extraordinary decision to annul the mayoral election held in March and repeat it on 23 June.
The vote in March was narrowly won by the opposition candidate, Ekrem Imamoglu: a softly-spoken former district mayor, who successfully reached out beyond the secular base of his Republican People's Party (CHP) and attracted voters exasperated with an economic slump.
The governing AK Party cried foul, alleging widespread irregularities and demanding a re-run. "He who wins Istanbul wins Turkey", as President Recep Tayyip Erdogan has often said.
Mr Erdogan was not going to let go of his home city without a fight. He was once the mayor - a position that projected him to national success.
The AKP complained that many ballot box-watchers lacked official approval. And yet, when at those same polling stations, voters elected district officials too - the majority backing the AKP - the party didn't protest.
The election authority decision was hailed by Erdogan loyalists but slammed by the opposition, which says supposedly independent electoral judges have bowed to political pressure.
Despite calls for an opposition boycott, the CHP has decided to contest the re-run. Mr Imamoglu has vowed to "win back our rights with a smile on our face". Pulling off his jacket and rolling up his sleeves, he seemed to embody the opposition's newfound verve. When he said "everything will be fine", it trended worldwide on Twitter.
The re-run is a highly risky strategy for President Erdogan. The economic hit was immediate - the Turkish lira fell again after a fall of more than 30% over the past year. An economy in recession, with inflation at around 20%, can hardly cope with more instability.
The momentum is with Ekrem Imamoglu, who has looked and sounded more and more like a mayor over the past few weeks.
And Mr Erdogan's own AK Party is divided on the issue. His predecessor as president, Abdullah Gul, one of the founding members of the AKP, is preparing to split and form a new party with former Finance Minister Ali Babacan, said Fehmi Koru, a close friend of Mr Gul. "He's extremely uncomfortable and restless with the situation," Mr Koru told me.
- Erdogan defends Istanbul re-run
- Turkey's rulers are bad losers, says vote 'winner'
- Erdogan: Turkey's pugnacious president
Ahmet Davutoglu, the ex-prime minister forced out by President Erdogan, is also expected to form a new party. He said recently that the president's inner circle "sees itself as above the committees of our party and aims to rule it like a parallel structure".
And the splits over Mr Erdogan's increasingly authoritarian line could widen with the re-run decision.
"If we had a free and fair election on June 23, Ekrem Imamoglu's chances would have been great", said Ersin Kalaycioglu, a professor of political science at Sabanci University. "But we no longer have that - or a working democracy."
It is hard to predict the outcome of the rerun, which is unprecedented in Turkish multiparty history. "If the AKP can instil fear in the hearts of its voters, it could win", said Professor Kalaycioglu. "But if smaller parties withdraw and back Imamoglu, it will work in his favour.
The AK Party front bench doesn't seem to care much about the economic impact or about the reaction from the West", he added. "They're prepared to win by any means - Istanbul is seen as much more important than anything else."
That international criticism has started to come in. German Foreign Minister Heiko Maas said the move was neither "transparent nor comprehensible" and prominent Belgian MEP Guy Verhofstadt tweeted that it showed Turkey "drifting towards a dictatorship", making continued EU accession talks "impossible".
That won't help revive an economy which is seeing virtually no new foreign direct investment amidst the political instability.
For 16 years, Mr Erdogan, Turkey's most powerful President since its founding father, Ataturk, has outplayed his opponents. He may have finally overplayed his hand.