An Underdog Challenges Erdogan

Turkey’s Recep Tayyip Erdogan began his rise to the presidency as a political underdog with support from Turks who felt marginalized by the country’s secular establishment. He is now the most powerful Turkish leader in recent memory.

But a new underdog is rising. On March 31, Ekrem Imamoglu won election as Istanbul mayor, beating Binali Yildirim, Mr. Erdogan’s preferred candidate, by 0.16%. At the Turkish president’s request, the Supreme Electoral Council annulled the result and called a new election, which was held last week. This time Mr. Imamoglu won decisively, 54% to 44%.

The real loser was Mr. Erdogan. Born in 1954 in a working-class Istanbul neighborhood, he came of age in a secularist political system that treated poor and pious Muslim families like his as second-class citizens. In the 1980s he entered politics through the Islamist Welfare Party, which wanted to eliminate the wall between religion and government. He rose quickly through the ranks with support from religious and working-class voters.

The RP’s popularity skyrocketed in the 1990s, and Mr. Erdogan was elected mayor of Istanbul in 1994. The following year the party came out on top in parliamentary elections and formed a coalition government. The Turkish military and courts, which saw themselves as the guardians of the country’s secularist political system, forced the government to resign in 1997 and the RP was subsequently banned.

A stint in jail for reading a poem that a military court said “undermined Turkey’s constitution” burnished Mr. Erdogan’s underdog image. In 2001 he established the Justice and Development Party, or AKP, which gained a parliamentary majority. Mr. Erdogan became prime minister in 2003.

He has repeatedly won re-election by delivering economic growth while also managing to keep up his reputation as the politician who speaks for Turkey’s forgotten working class. He gradually consolidated his power and was elected president in 2015. Voters approved a 2017 constitutional referendum adopting an executive-style presidency that puts all three branches of government—including the courts, which once hounded Mr. Erdogan—under the Turkish leader’s thumb. Mr. Erdogan is now head of state, chief executive of the government, and boss of Turkey’s largest political party. As commander in chief, he dominates the military, another former adversary.

The outsider politician has become the establishment he once fought to bring down. Mr. Erdogan holds so much power that many Turks consider him solely responsible for the country’s current problems, including a renewed conflict with the Kurdistan Workers’ Party, a sputtering economy, and increased political oppression.

By annulling Mr. Imamoglu’s victory, Mr. Erdogan unwittingly boosted his rival. Turkey is a centralized state—local governments rely on Ankara for much of their revenue—so Mr. Erdogan has the power to make Mr. Imamoglu’s life difficult. But the president should be careful not to overplay his hand. The Turks love an underdog, as they’ve demonstrated more than once.

Mr. Cagaptay is a senior fellow at the Washington Institute for Near East Policy and author of “The New Sultan: Erdogan and the Crisis of Modern Turkey.”