The decision by Erdgoan’s Turkish authorities to wipe away a stinging defeat for President Recep Tayyip Erdogan last month and rerun the election for mayor of Istanbul left is an even bigger defeat for the would-be caliph. The move by Mr. Erdogan to overturn the election results quickly reverberated through Turkey and beyond.

Ekrem Imamoglu, the opposition candidate who first won the March 31 election, only to have that victory annulled on Monday, made good on his promise today — “We will win again.”

In a stunning rebuke of Erdgoan, Imamoglu handily won.

Related: Turkey Sentences 151 to Life in Prison Over 2016 Coup Attempt

Turkey: As of 96% counted, the opposition party CHP (S&D) is the winner in today's Istanbul mayoral election. First time since 1994 that an anti-Erdogan party wins the mayoral position in Turkey's largest city. #Istanbul #TurkeyElections #Istanbul

Turkey’s President Looks Headed for Stinging Defeat in Istanbul Election Redo

ISTANBUL — Voters in Turkey appear to have delivered a resounding rebuke to President Recep Tayyip Erdogan on Sunday by again electing an opposition candidate for mayor of Istanbul, outraged that his party forced the cancellation and redo of the same vote two months ago after it lost.

The Turkish news media reported that with 99 percent of votes counted, the opposition candidate, Ekrem Imamoglu, was leading with 54 percent, compared with 44 or 45 percent for Mr. Erdogan’s chosen candidate, Binali Yildirim.

Two hours after polls closed, Mr. Yildirim went on national television and conceded defeat.

“As of now, my competitor Imamoglu is leading. I congratulate him, wish him success,” he said. “I wish our friend Ekrem Imamoglu will bring good services to Istanbul.”

Mr. Imamoglu appeared at a live news briefing soon after, and urged supporters to stay at the ballot boxes until the count was finished.

Sign up for The Interpreter

Subscribe for original insights, commentary and discussions on the major news stories of the week, from columnists Max Fisher and Amanda Taub.

Supporters whistled in the streets as they caught the results on their cellphones in outdoor cafes. A car raced through the streets, honking its horn as after a soccer match.

The vote “shows democracy is resilient and elections still matter,” said Soner Cagaptay, the director of the Turkish Research Program at the Washington Institute for Near East Policy. “Imamoglu won with a landslide — a 10-point lead — even though Erdogan mobilized all the state resources in this election.”The mood had been tense in Istanbul during the day as people voted.

“The cancellation of the vote was completely unlawful and illegal,” said Hatice Eksioglu after casting her ballot. “I am certain that he will win, but I am afraid,” she said, referring to Mr. Erdogan.

The opposition’s wresting the country’s largest city from Mr. Erdogan’s control would be the biggest defeat of his political career, ending his party’s 25-year dominance of the city. Opponents say such a loss would crack the president’s aura of invincibility and could be the beginning of the end of his 16-year rule over the country.

Istanbul is Mr. Erdogan’s home as well as political base, where he began his political career as mayor.

Mr. Imamoglu, 49, is a former district mayor who was backed by an alliance of opposition parties, united by their rejection of Mr. Erdogan’s increasingly authoritarian grip on Turkey.

This election was Mr. Imamoglu’s second victory. He first won the vote on March 31 by a small margin. But Mr. Erdogan’s Justice and Development Party, or A.K.P., contested the results, and the High Election Council ordered the do-over.

Besides the blow to Mr. Erdogan’s image and prestige, the loss of Istanbul will have practical political consequences for the Turkish leader, analysts said.

“Losing Istanbul would mean losing a significant revenue source for A.K.P.’s political machinery, ranging from subsidies to the party faithful to construction contracts and funds for pro-government media,” Asli Aydintasbas, a senior fellow with the European Council for Foreign Relations, said before the vote.

“It would set off a chain reaction that can herald early elections later this year or in 2020,” she said.



Supporters of the main opposition Republican People’s Party celebrating the election results in Istanbul on Sunday.

Ozgur Unluhisarcikli, the Ankara director for the German Marshall Fund of the United States, a research organization, predicted ahead of the election that the A.K.P. would grudgingly accept the results. But he said the party would seek to manage the change of power in Istanbul by “hollowing out the powers of metropolitan mayors in time.”

Mr. Erdogan grew up in a working-class district on the Golden Horn in Istanbul and embarked on his political career as a popular and energetic mayor of the city in the 1990s.

The city has remained in the hands of his party ever since, and he has transformed it with extensive infrastructure projects and grandiose signature constructions, including a vast hilltop mosque, high-rise towers and expanding suburbs.

But Mr. Erdogan’s popularity in Istanbul, which derived largely from delivering services to city residents, has waned in recent years as the construction boom has stalled and the economy has slipped into recession.

Unemployment and inflation have angered Turkish voters and cost Mr. Erdogan several of the largest cities, including the capital, Ankara, in local elections in March.

“Erdogan lost his magic touch,” said Mr. Cagaptay, the analyst. “Erdogan was this politician who came from the other side of the tracks, representing the voice of the common man, the pious, the dispossessed, making this his brand for nearly two decades. That is gone.”