Mayoral elections in Turkish cities do not usually grab the world's attention.
But the defeat of the ruling party's candidate for Istanbul mayor - once during its March election and then again, even more definitively in a June rematch - is a sign that Turkey's most powerful political party is losing its influence after nearly two decades of control.
The party's leader, President Recep Tayyip Erdoğan, himself has said many times, "If we lose Istanbul, we lose Turkey."
All political movements eventually run out of steam. But Erdoğanism dramatically changed Turkey, diminishing its democracy. The crumbling of Erdoğan's Justice and Development Party, known as AKP, will now change Turkey in other ways.
I've watched Turkish politics closely for three decades because of my work in the country training and consulting on education reform. As a Fulbright scholar, I lived in Turkey when Erdoğan first took power and consolidated control over every aspect of Turkish society.
When Turkey's currency, the lira, dropped by 20% last year, the slide risked a global crisis. Turkey is also an important NATO ally, allowing its land and air bases to be used for the alliance's military operations into places such as neighboring Syria and Iraq.
The new political power struggle could spark a resurgent democracy in Turkey. The opposition against AKP could unify nationally.
But the struggle also has the potential to create cascading financial and political crises. This is what is at stake.
The Republican People's Party, or CHP, is Turkey's oldest political party, formed after the Turkish revolution of 1923.
İmamoğlu is 16 years Erdoğan's junior and had held the unassuming position of mayor of Beylikdüzü, a district of Istanbul.
Istanbul, a city of 16 million people, accounts for one-third of Turkey's gross domestic product and is larger than many national economies. Whoever controls Istanbul's massive municipal budget also controls its patronage.
Erdoğan called the results of the first election, held in March, "blemished." He asked his hand-picked High Election Council to investigate. That election was then annulled and a new election was held June 23.
In the rematch, the usually fractious opposition to the AKP unified behind İmamoğlu, mounting a serious challenge to the AKP's power in its largest base of support.
İmamoğlu's campaign insisted that the first election was legitimate. Nevertheless, he ran a second time and his second victory was a landslide, with a margin of 800,000 votes compared to a 13,500 difference in the March contest.
When Erdoğan finishes his current term, he will be the longest-serving national leader in Turkish history, having won every national election since 2002.
His latest term began 2018 by reversing Turkey's progress toward a democratic state, using an alleged plot to overthrow the government as an excuse to arrest and jail military and political opponents.
He then leveraged the government's ability to fine companies to his own benefit, both personal and political. Once-independent media outlets such as the Turkish Radio and Television Corporation and Andadolu Agency became messengers for Erdoğan's AKP party. As critics and challengers disappeared, Erdogan continued to consolidate his power over more of the country.
His ability to get what he wants has been so complete that his followers call him "the Great Master."
In 2017, Turkish voters approved a new constitution that he sought. It gave him the title of first "executive president" and very broad constitutional powers at the cost of the independence of the legislative and judicial branches of government.
Things fall apart
But since then, there have been signs of growing unease with Erdogan's tactics.
Earlier this year, more than 1,000 Turkish academics and their colleagues overseas signed an open letter condemning Erdogan's bombing of more than 100 targets in Kurdish areas in Syria near its borders.
And just this month, Erdogan fired the head of the Central Bank in an apparent power struggle over the country's interest rates, indicating that the bank was no longer firmly in his grip.
In the meantime, AKP's vote share, while still the largest, has dropped significantly. Its main rival, the CHP, seems to be reemerging as a serious national competitor with its municipal wins across Turkey in 2019.
Continued controversies also threaten the support that does exist for Erdogan and his party.
For example, the new mayor of Istanbul immediately opened an investigation into whether the AKP misused public funds during the election. A preliminary investigation has revealed an expenditure of US$145 million to a youth foundation associated with Erdogan's son, Bilal, as well as the quickly suppressed story of alleged sexual impropriety concerning Erdogan's Minister of Finance (and son-in-law) Berat Albayrak. There have been many others over the years.
What now for Erdoğan, Turkey?
Erdoğan's autocratic past behavior - jailing lawmakers, political dissidents, journalists - clearly suggests he will make the erosion of his power painful for Turkey.
Erdoğan's popularity has always been tenuous. In both presidential races, including his most recent in 2018, Erdoğan didn't exceed 52.5% of the vote. The AKP in the parallel parliamentary election happening at the same time in June 2018 fell short of Erdoğan's share. This suggests AKP is far less popular than he is.
Whether or how quickly the end for Erdoğan may come will be determined by how united the opposition remains. It is also possible a new political party will emerge, created by former allies of Erdoğan who said their current party under his leadership "caused a serious slide in rhetoric, actions, morals and politics."
Overall, the aura of Erdoğan's invincibility seems to be dissipating and Turkey appears to be nearing the day that the transfer of power is viewed as a normal and nonexceptional part of political life.
When that day comes, Turkey will have become the democracy that was intended in the revolution of 1923.
Author: Gary M. Grossman - Associate Director, School for the Future of Innovation in Society, Arizona State University