Image Credit: Ramachandra Babu/©Gulf News

Ahead of local elections throughout his country last weekend, Turkish President Recep Tayyip Erdogan resorted to his usual tactics. He cast some of his ruling party’s opponents as traitors. He screened the horrific video of the massacres at two mosques in New Zealand. And he stirred angry nationalism from city to city in a bid to distract voters frustrated by the country’s faltering economy.

But this time it didn’t work. In what’s being viewed as a rebuke to Erdogan, candidates representing his Justice and Development Party, or AKP, were defeated in the major cities throughout Turkey including the capital, Ankara, as well as Izmir, Adana and Antalya. In Istanbul, the country’s biggest city, a politician from the opposition Republican People’s Party looks to have secured a majority of votes, though the AKP is challenging the result, and there are fears of government foul play afoot. Even as AKP officials point out that they and their coalition partners won the most votes across the country, the next days will test Erdogan’s ability to stomach defeat.

The loss of Istanbul would be an especially harsh blow to the president, wrote The Washington Post’s Kareem Fahim. Erdogan rose to national prominence as the city’s mayor from 1994 to 1998. The city has since served as a source of wealth and prestige for his party and a showcase — with its sprinting construction, megaprojects — for his broader ideological vision.

But amid a grim economic downturn, which has seen the country’s currency, the lira, lose a third of its value against the dollar, Erdogan could no longer hang his hat on the prosperity ushered in during an earlier period of his rule. And his divisive populism failed to secure enough nationalist support among urban voters.

In many countries, municipal elections are low on the totem pole of political relevance. But in Turkey’s system, they select the heads of the country’s 81 provinces and the cities and towns within them. This round of elections was also a crucial litmus test for the years ahead. For the past half-decade, Erdogan has taken Turkish voters on a ceaseless electoral roller coaster. But Erdogan, who either as prime minister or president has been in power for close to two decades, does not face an election until 2023. That’s just as well, given the chastening verdict from Sunday.

“The loss of Turkey’s major cities has also shattered Erdogan’s image as an invincible politician,” wrote Gonul Tol, a Turkey scholar at the Middle East Institute in Washington. She added that the election delivered “a huge blow to the clientelistic network Erdogan has built over the last 25 years.”

At the same time, the election was the latest sign of a more-galvanised opposition overcoming years of division and dysfunction. The deflating outcome for Erdogan adds to his mounting woes. Abroad, he is engaged in a new squabble with the United States over Turkey’s purchase of a Russian missile defence system. At home, he faces mounting calls to enact deep economic reforms.

It’s a terrible result for Erdogan, Berk Esen, an assistant professor of international relations at Ankara’s Bilkent University noted. There’s an economic crisis, there’s an international crisis due to an ongoing standoff with the US. At the same time, there is an electoral defeat that shows his international partners and domestic opponents that he’s quite vulnerable.

There’s a broader story to be told, as well. Well before President Donald Trump, or Hungarian Prime Minister Viktor Orban, Erdogan arrived at the politics of the zeitgeist. His pro-business, centre-right agenda eventually gave way to a more hardened nationalism, and his majoritarian policies were built around retaining power. Pro-Erdogan business executives have taken control of many of the country’s leading independent media houses.

But even with the deck stacked against them, the opposition made tactical alliances and managed to score significant wins. Moreover, as much of Europe reckons with the ascent of upstart populist or nationalist parties in their countries, Erdogan offers a cautionary tale for others. “When populist rhetoric comes from a fresh face and aims at a calcified elite, it sounds plausible,” wrote Selim Koru, an Ankara-based analyst. “When it has supplanted that elite, and it has reached its demographic limits, it begins to look ridiculous.”

Ishaan Tharoor writes about foreign affairs. He was previously a correspondent at Time magazine