Turkish voters reminded us on June 7 that Turkey is not Russia and that the country’s authoritarian President, Recep Tayyip Erdogan, can’t simply become Vladimir Putin. In parliamentary elections Erdogan’s ruling Justice and Development Party, known by its Turkish initials AKP, fell far short of expectations. For the first time in 13 years, the AKP didn’t even win a simple majority and will now have to form a coalition government. In an election viewed as a referendum on his leadership–he wanted a supermajority in order to rewrite Turkey’s constitution to give himself more power–Erdogan was turned back by Turks.
But a loss for Erdogan was a victory for democracy in a country that had lately gotten off track. In his earlier years in power, then Prime Minister Erdogan helped unlock the country’s growth potential by empowering development and entrepreneurship across the country’s Anatolian heartland. Under his leadership, Turkey’s per capita income practically tripled in a decade. Erdogan and the AKP proved that an explicitly Islamist political party–a first for Turkey–could promote political stability, religious freedom, a forward-looking foreign policy and a pro-growth economic agenda.
Then things got more complicated. Tougher economic times triggered by the financial crisis heightened Erdogan’s sense of vulnerability, and domestic political rivalries became fights for survival. He spoke loudly and often about enemies who would remove him and his party from power. His foreign policy became a mix of nationalist paranoia and anti-Western resentment straight out of the Putin playbook.
When party term limits prevented further service as Prime Minister, Erdogan ran for President in 2014. After winning, he campaigned for constitutional change that would centralize more power in what had been the largely ceremonial presidential role.
The AKP’s lackluster election results put Erdogan’s ambitions on hold for now. Make no mistake: Turkey will be a mess for some time to come. Markets and the Turkish lira swooned on news of the election results and speculation over the uncertain road ahead. But the big news is that there are still checks on Erdogan’s ambitions, even within his own party. It’s a step back for a still powerful leader–and a step forward for his country.
Foreign-affairs columnist Bremmer is the president of Eurasia Group, a political-risk consultancy
This appears in the June 22, 2015 issue of TIME.