Erdogan’s advent to power started in 1994, almost a quarter of a century ago , when he was unexpectedly and narrowly elected mayor of Istanbul with 25% of the vote. In those elections, Ankara was won by the Islamist Welfare Party, of which Erdogan was the chairman of its Istanbul branch and the rising star of the party.

Yet Erdogan is the loser of the local elections when viewed as a referendum on the president himself. This is because these elections were — more than anything else — of symbolic importance on whether he could retain his party's control of Istanbul and Ankara, Turkey’s commercial hub and capital, respectively.

It is true that his party is still, mathematically, the leading force in Turkey, garnering 44.3% of the vote with an 83% voter turnout . It is also true that the sum of the total votes of the nationalist alliance Erdogan forged with his ally, the Nationalist Movement Party (MHP), led by Devlet Bahceli, stands at 51.6%, a figure similar to that which gave him the victory in the first round of the presidential election in June 2018.

It was Erdogan who transformed the municipal elections into a referendum of sorts, one that would renew and enhance his executive presidency, by employing a frenzied election campaign . And he lost this referendum.

The results of the local Turkish elections held on March 31 are stunning, not only for those pessimists who expected nothing interesting out of the vote, but even for the optimists who thought the elections would serve as a lesson for President Recep Tayyip Erdogan.

Losing Istanbul and Ankara could send a signal that it is the beginning of the end for Erdogan’s power, notwithstanding how long it may continue. A popular Turkish saying goes, “You rise from where you fall,” and this is apt for what happened March 31.

Losing Ankara, the capital of political power in Turkey, would be traumatic enough for Erdogan. Yet his was a likely outcome given the opinion polls revealed before the elections. However, the consensus was that Erodgan would do everything in his power not to let Istanbul “fall,” a prospect that seemed unlikely.

Now, Erdogan not only lost Ankara, but cannot retrieve Istanbul, a city lost on that long Sunday night, when the data flow from the vote count stopped around 11:20 p.m., the moment it became apparent he would lose the “crown jewel” of Turkey.

Erdogan rushed to Ankara to make his traditional victory speech from the balcony of the ruling party’s headquarters around 3 a.m. Yet he could not declare victory in Istanbul.

Only a few hours later, the chairman of the High Election Council, an Erdogan loyalist, announced that the opposition candidate for Istanbul, Ekrem Imamoglu, was safely ahead, and the remaining 100 uncounted ballot boxes would not alter the shocking outcome.

Adding to the catastrophic losses of Istanbul and Ankara, the ruling party also lost Antalya, Turkey’s tourism capital; Adana, the sixth largest city and an important industrial hub, which had not been won by an opposition party since 1989; and Mersin, the largest port on the Mediterranean Sea.

The engines of Turkish economic life and social change are no longer under Erdogan’s control. All of those urban centers that generated money and economic power, which Erdogan’s Justice and Development Party (AKP) greatly relied upon, have passed to the hands of the opposition.

All in all, the perception that Erdogan is invincible was smashed Sunday.

Although in his statements the president signaled satisfaction at the results in Turkey’s Kurdish southeast, he lost there as well. The pro-Kurdish Peoples’ Democratic Party (HDP), which was demonized as a “terrorist” and “traitor” party by Erdogan during the campaigning period, proved to be the leading political player in the region. It managed to do so at a time when some 10,000 HDP activists and officials are either in jail or detained. The HDP won in the political and spiritual center of Diyarbakir, the second largest metropolitan center in the region, as well as in Van, Mardin and Batman.

Nevertheless, it is a psychological blow for Erdogan, who put the mayors of all those HDP-run cities in jail and had appointed trustees from Ankara. The Kurds rejected these appointees through their votes.

The only seemingly important loss in the region is the town of Sirnak. This HDP stronghold was lost to the AKP, which secured an amazing 60% of votes. However, some facts cannot be ignored: 70% of Sirnak was devastated in the events of 2015-2016, and the 40% of its population who left the town have not come back. The town has been transformed into a garrison, with 16,000 police and military personnel registered as voters.

The primary role of the pro-Kurdish HDP was decisive, to the chagrin of Erdogan. The HDP ran its candidates in the Kurdish southeast but refrained from doing so in the west, calling its supporters to vote for opposition candidates. The electoral victories of the main opposition Republican People's Party (CHP) in Istanbul, Antalya, Adana and Mersin, cities with sizable Kurdish inhabitants, were mostly due to the HDP’s electoral base, which tipped the balance against Erdogan’s men. In Istanbul, for instance, the HDP had 11% support. Its jailed leader Selahattin Demirtas sent a message day before the election from his prison cell, calling on his supporters to vote for the opposition.

In summary, March 31 is the day Erdogan's fortunes were upended. It is true that, as he emphasized, he will enjoy executive power for over four years, with no elections until August 2023, but his term will no longer be a smooth ride.

The Washington Post editorial expressed it accurately and eloquently: “Erdogan’s own position is unaffected: His term in the powerful presidential post has four more years to run, and his coalition still has a majority in the national parliament. But the defeat of his hand-picked nominees in the big cities, driven by a massive turnout of voters, sent an unmistakable message that Turks are tiring of his strongman style — and that the country’s democracy, while on life support, still breathes.”

Erdogan has to grapple with the economic and financial crisis Turkey is facing.

According to a source who is close to Erdogan, he has two options in the aftermath of the elections. The source said everything will be about the economy from now on.

Erdogan has to bring back the International Monetary Fund and implement the fund's reform program. If he does so, he could repair the damage and save the country from the crisis. But that comes with a price, as it means he certainly will lose the elections in 2023. Or, the source said, he will sell as many assets as he can to preserve the status quo of his power, and that will lead to economic collapse after a year or so.

The election results could also propel Erdogan to be more repressive, particularly against the Kurds, and steer Turkey toward a disaster. Turkey, after these milestone local elections, will be a place that deserves to be followed and observed. As it used to be said, there is never a dull moment in Turkey — and it seems there never will be.