The balloting in Istanbul on June 23 was in fact a contest between the Republican Peoples Party’s (CHP) candidate Ekrem Imamoglu and President Recep Tayyip Erdogan.

Erdogan’s acerbic remarks about Imamoglu prior to the elections also proved this. Binali Yildirim, the candidate for Istanbul mayor from Erdogan’s Justice and Development Party (AKP), was of secondary importance in this race.

The elections on June 23 were a rerun of the elections on March 31 which Yildirim lost to Imamoglu by a margin of 13000 votes. Erdogan was much more upfront than Yildirim in the campaigning for the March 31 elections and his tone then was also abrasive and divisive.

This approach, however, did not bring Yildirim the victory Erdogan had hoped for. He was determined, however, not to let Istanbul fall into the hands of the opposition after 25 years.

Erdogan also recalled that becoming mayor of Istanbul can carry you all the way to the top. That, after all, was his path to power too.

Not prepared to accept the results on March 31, Erdogan used his hold over the judiciary and got the vote for Istanbul mayor annulled on questionable grounds that even many of his own supporters failed to understand.

Hundreds of thousands of traditional AKP voters had stayed at home during the elections on March 31. With help from his advisors, Erdogan believed that if these people could be energized into going to the ballot box Yildirim would win the rerun by a safe margin.

That turned out to be a gross miscalculation resulting in a 59-fold increase in Imamoglu’s margin over Yildirim.

The 800000 extra votes that Imamoglu garnered on June 23 shocked Erdogan and his advisors, ministers, and supporters. The ugly tactics they employed against Imamoglu during the brief campaign period before the rerun vote rebounded on them in a way they never expected.

They realize now that that Imamoglu’s victory points to serious political implications for Erdogan and the AKP if a fresh approach can’t be found to regain public confidence.

A significant sign of this awareness came when Erdogan – having been left with no other choice – had to bite the bullet and congratulate Imamoglu for his resounding victory.

Having always underlined the importance of the ballot box when it suited him, Erdogan’s image would have sustained even more damage if he somehow also questioned the results of the rerun elections for Istanbul mayor.

He has to operate under the shadow of these results now and his words and actions will matter even more henceforth. These will also have serious implications for his political future, as well as that of the AKP.

Put simply, Erdogan has to tone down his angry, accusative, and divisive rhetoric over the coming period if he is to recoup the losses he incurred in the Istanbul elections.

Internationally Turkey is increasingly giving the impression of being a beleaguered and isolated country. Erdogan will also have to recalibrate his approach to diplomacy now.

The Turkish public, which is increasingly fed up with political infighting at home, is also unhappy to see Turkey turning into a country that is at odds with the world.

In 2017 Erdogan pushed for an executive presidency that is unencumbered by any system of checks and balances, and in the end, became Turkey’s sole leader.

The results of the municipal elections in Istanbul, however, have also started a debate on whether Erdogan’s presidential system suits Turkey. It is significant that this debate is also growing within AKP circles.

If we are to put the matter in a nutshell, Erdogan has painted himself into a “lose-lose” corner. Had he accepted the results of the March 31 elections for Istanbul, Imamoglu would have been the mayor.

The small margin with which he won the elections would, nevertheless, have left Erdogan’s shadow looming over him. Now, however, the roles have changed. It is Imamoglu’s shadow that looms over Erdogan.

Erdogan will, therefore, have to transform himself politically if he wants to extricate himself from the tricky position that his mistaken strategies and tactics have landed him in. The big question is, can he do this?

Put in a nutshell we are faced with an Erdogan versus Erdogan situation. The outcome of this will have serious implications for Turkey, let alone for Erdogan and the AKP.