ISTANBUL - Mehmet Toroglu and Tan Cetin from VOA's Turkish Service contributed to this story
Turkey's opposition victory in the Istanbul mayoral election was officially ratified Monday, with analysts saying it shows the country is still capable of having competitive elections.
The victory for opposition candidate Ekrem Imamoglu was a significant defeat for Turkish President Recep Tayyip Erdogan. Once thought as invincible in the polls, the defeat is both personal and political.
The drop in support for his party was evident in Uskudar, a district on the Asian side of Istanbul where Erdogan has his personal residence, and a historical AKP stronghold. Erdogan's rise to power was built on winning the city's mayorship in 1994.
Ozgur Unluhisarcikli, from the German Marshall Fund of the United States (GMF), told VOA Turkish the elections "have proved a very important point about Turkey: Even if elections in Turkey are unfair and only partially free, they are still real and competitive, and the opposition in Turkey has a real chance of winning."
The election was a revote of a poll in March, which Erdogan got election authorities to annul on the technicality of ineligible election monitors.
Imamoglu won decisively in the revote, taking more than 800,000 votes over the ruling party's Binali Yildirim, a far wider margin than his narrow win of 13,000 votes in March.
Yildirim was quick to congratulate Imamoglu on his victory.
"Elections mean democracy, and these elections revealed one more time that it works perfectly in Turkey," he said.
Erdogan also congratulated Imamoglu in a tweet. "The national will has been manifested again," wrote Erdogan.
Soner Cagaptay, director of the Turkish Research Program at the Washington Institute for Near East Policy, told VOA Turkish that in canceling Imamoglu's March 31 win in Istanbul, Erdogan effectively handed him the victory by branding him the politician who represents the people.
"This is how Erdogan was able to come to power as a pious conservative working-class roots politician who represented Turkey's mostly pious working-class masses. But of course in 20 years since, Erdogan has become the power, and by canceling Imamoglu's victory, he has turned him into the new Erdogan. Imamoglu now stands for the dispossessed and marginalized," Cagaptay said.
Among supporters of Erdogan's AK Party, there are mixed feelings about Sunday's defeat.
Istanbul resident Ali Kasimoglu told VOA he usually supports Erdogan's ruling party, but said in this election, he was happy Imamoglu won.
"In my opinion, Ekrem Imamoglu won the March 31 elections, and it should have stayed that way. There shouldn't be a second election. It is just more expenses, more cost," he said.
"Personally, I am sad. I have been voting for Tayyip since his first mayoral election in Istanbul in 1994," said retiree Yucel. "It would have been better if Erdogan's man, Binali Yildirim won," he added "For years, these men have been in power. They know it much better. This newcomer (Imamoglu), what does he know?"
Erdogan put his political prestige on the line campaigning for his candidate, Banali Yildirim, in a campaign laced with hard-line nationalist rhetoric.
Observers say the president's campaign will strengthen critics with his party, who accuse him and his AK Party of abandoning its once broad inclusive base.
"When (the) AK Party was established, it was a really an inclusive party. It was not as nationalist as it is at the moment," said sociology professor Mesut Yegen of Sehir University. "Before, its main body was conservatives. But there were liberals, there were Kurds. Whereas today, those who are running (the) AK Party do not represent the diversity of conservatives, the conservative and religious people, in Turkey. "
Yegen claims Erdogan's Sunday defeat can only give impetus to a growing movement within his party preparing to challenge the president.
"Those who are about to build this new party will basically tell the Turkish people that 'OK, we need a kind of more diverse or much more inclusive conservative liberal party,'" Yegen said.
Observers say that resentment has been growing over Erdogan's increasingly authoritarian style of leadership after a failed coup attempt in 2016, marked by mass purges and sweeping crackdowns against businessmen, journalists and human rights activists.
WATCH: Turkey elections