Turkish President Recep Tayyip Erdogan (previously) was dealt a stinging rebuke in March, when voters in Istanbul overthrew his AK Party, which had run the city for 25 years; Erdogan had previously said "whoever wins Istanbul, wins Turkey.">
Erdogan's 15+ years in Turkish high office has been a steady march to authoritarianism, including violent attacks on peaceful protest movements; mass arrests and purges of civil society groups, university faculties, the military and police, the seizure of sweeping dictatorial powers, mass-scale financial misconduct -- even building himself a $1b palace at public expense.
So it was not really surprising that Erdogan's response to his electoral loss was to nullify the election, citing imaginary irregularities, and ordering a re-run. Erdogan began his national political career when he was elected as mayor of Istanbul in 1994.
The election ran again at the end of June -- and Erdogan lost again, by a landslide. The March election was carried by a margin of 13,000 votes, while AKP and Erdogan lost the re-run by more than 75,000 votes. It's Istanbul's biggest mayoral election victory in 35 years.
The new mayor of Istanbul is Ekrem Imamoglu of the Republican People's Party (CHP), whose campaign slogan was "justice, equality, love" and who ran on a promise to end AKP's lavish croynism and waste (the city's annual procurements budget is $4b). During the election, AKP smeared Imamoglu with a variety of ad-hominems: "terrorist, coup-supporter, fraud, Greek, even equating him with the Egyptian autocrat President Sisi,"
Istanbul has 15m residents, almost a fifth of the population of Turkey, and accounts for about a third of Turkey's GDP. Other major Turkish cities like Izmir and Ankara have elected opposition figures in recent municipal elections.
AKP is splintering, with Erdogan's in-party rivals breaking away to found new parties to oppose him. Erdogan has until 2023 to call elections, but many believe they will be forced to call a vote sooner than that.
Whispers will now grow louder about the beginning of President Erdogan's end. But even if it comes - and nobody here underestimates his ability to bounce back - unpicking a quarter of a century of Erdoganism would take far longer.
Turkish society has been battered over recent years, the country plummeting in indexes of press freedom, judicial independence and human rights. But the one thing the opposition clung on to for dear life was free elections.
They partied late into the night here, celebrating victory - but also the fact that there is still life in Turkish democracy.