ISTANBUL: Turkish President Recep Tayyip Erdogan suffered a major blow on Sunday as the opposition candidate in Istanbul's controversial mayoral election re-run romped to victory.
Ekrem Imamoglu won the first vote in March by a tiny margin of just 13,000 votes in the city of 15 million.
But after being stripped of that victory over controversial claims of fraud, he vowed a "battle for democracy" that turned him into a household name.
With more than 99 percent of ballots counted on Sunday night, Imamoglu was winning by more than 775,000 votes -- and had 54 percent overall.
"It was not a single group or party, but the whole of Istanbul and Turkey that won this election," Imamoglu said in his victory speech.
"Mr President, I am ready to work in harmony with you. I convey from here my request to meet with you in the shortest time possible," he added.
Critics accused Erdogan of refusing to give up control of Istanbul, Turkey's economic powerhouse and a crucial source of patronage for Islamic conservatives since he won the mayorship himself a quarter of a century ago.
But Imamoglu, a little-known district mayor at the start of the year, galvanised voters with a relentlessly positive campaign under the slogan "Everything will be fine".
That was in stark contrast to the usual aggressive name-calling of Turkish politics and struck a chord with voters.
He faced the juggernaut of the AKP, which has ruled Turkey since 2002 and remains the most popular political force nationwide.
The AKP's candidate, Binali Yildirim, a mild-mannered Erdogan loyalist who oversaw several huge transport projects and served as prime minister, had already struck a conciliatory tone earlier on Sunday.
"If we have wronged, knowingly or unknowingly, one of our fellow Istanbulites or our challengers, if we have done something unjust, I ask for your forgiveness," he said.
Conceding defeat later in the day, Yildirim congratulated Imamoglu and wished him good luck.
"It's a colossal defeat for Yildirim but also Erdogan. His gamble (in calling for a replay of the election) backfired," Berk Esen, assistant professor of international relations at Ankara's Bilkent University, told AFP.
It comes as an economic slump and rising prices have dented the president's reputation for economic stewardship, with the AKP also losing the capital Ankara in March.
"The AKP elites will probably try to de-emphasise the election and act like it's no big deal," said Esen.
Erdogan has indeed already played down the importance of the re-run, saying last week that the choice of mayor was "only a change in the shop window" since the AKP controls almost two-thirds of the city's districts.
But it was a bitter loss for AKP voters, with some in tears at the party headquarters on Sunday night.
"Let them rejoice while they can, they will see." vowed retired shopkeeper Mehmet.
Despite recent setbacks, Erdogan and his party remain the most popular force in Turkish politics.
For many conservatives, Erdogan remains a hero who has brought prosperity and fiercely defended the country's interests since taking over in 2003.