The ruler of Turkey the past dozen years suffered a setback last week when his party lost its absolute majority in Parliament. Recep Tayyip Erdogan, until last year prime minister, now president, has been the most consequential Turkish political figure since Mustafa Kemal Ataturk forged a republic out of the ruins of the Ottoman Empire in the 1920s and 1930s. Through one victory after another, he got used to winning.

Whereas Ataturk laid down a strict secular regime — most religious symbols were banned from public view — Erdogan, whose Justice and Development Party (AKP) expresses Muslim values, relaxed the rules. He won, and kept, the support of the Muslim masses. Moving deliberately, avoiding a direct confrontation with the once-interventionist generals and the secular establishment, he had by the end of the 2000s established political hegemony.

That was cut back in last week's parliamentary elections. The vote for the AKP dropped below 50 percent. The right-wing Nationalist Movement Party gained and is the most likely coalition partner for the AKP. The big surprise was the surge of the People's Democratic Party, a liberal, leftish group with roots in the large Kurdish minority. As president, Erdogan has more limited powers than he did as prime minister. His plans to change that went out the window with his party's losses. But in preparation for his transition to the new thousand-room presidential palace, he weakened the prime ministerial powers and counts on the loyalty of the party he created.