Turkish President Recep Tayyip Erdoğan speaks during the opening ceremony of the Ziraat Katilim Bank (participation bank), in Istanbul, Turkey, May 29, 2015. | EPA Opinion Don’t rejoice yet: Erdoğan could still win Forming a coalition in Turkey will be a nightmare, and the strongman has the trump cards.

For 13 years, the escape routes from Turkey’s political haunted-house have been shutting one by one. Suffocation seemed inevitable. The June 7 election, which resulted in the first hung parliament since 1999, cracked open a tiny window in the attic. Turkey’s hope is now predicated upon an unlikely scenario: One in which every major political group exits from that window in an orderly fashion, even as the smoke is rising.

The Justice and Development Party, or AKP, lost the majority with which it had governed since 2002. But it remains by far the largest party in parliament, with 258 seats. The Republican People’s Party, or CHP took only 132 seats. The Nationalist Movement Party, or MHP, won 80. The astonishment of this election was the success of the Kurdish Peoples’ Democratic Party (HDP), whose candidates had previously run as independents to bypass Turkey’s 10 percent election threshold. Like the MHP, the party won 80 seats.

But beware: There is something about the language now being used to describe the HDP that is reminiscent of the early days of the AKP. It takes a special kind of stupid to fail to appreciate the eagerness of the West to befriend anyone or anything in Turkey that sounds even remotely like a Western liberal. This eagerness generally precludes asking too many questions. The HDP has become the instant darling of a foreign media eager to find in Turkey a genuine liberal party. And true, Selahattin Demirtaş, the HDP leader, may represent some Turkish liberals. But mostly he represents conservative and nationalist Kurds. Many have been voting for the AKP for years. In the southeast, there has long been cooperation between the AKP and the Kurdish tarikats (or religious orders) and clans.

The HDP cake may have a leftist-liberal-secular crust, but most of its filling is socially conservative Kurds.

The political economist Erik Meyersson carefully studies Turkish electoral statistics. After considering the recent results, he concluded: “The HDP cake may have a leftist-liberal-secular crust, but most of its filling is socially conservative Kurds.” The rise of the HDP, he plausibly argues, does not represent the revival of the Turkish left. It represents the unification of its Kurds under one political banner.

The HDP’s success has sharply raised expectations among Kurds. If they are not met promptly, the consequences will be incendiary. But now we get to the tricky business: We must get everyone in Turkey — not just the HDP’s supporters in the southeast — through that tiny attic window.

What most Turks want — what most supporters of the AKP have wanted; what most people who voted repeatedly for them and for their democracy-destroying referendums have wanted — is stability. Turks have long known, in other words, that they were voting to give the AKP all the power. They reckoned this the lesser of evils. It would have been far worse, they felt, to see a serious struggle among the warring Turkish power centers. Such conflicts were associated — in immediate, living memory — with coups, tanks in the streets, utterly ineffectual coalition governments, hyper-inflation, and economic crises that made the West’s 2008 look like Xanadu.

The economy, above all, has driven voter behavior since the rise of the AKP. Turkey remained corrupt, lawless, and authoritarian under Erdoğan. It also became bitterly and openly divided in novel ways. But the divisions have not truly been so much between “Islamists and secularists,” or “conservatives and liberals,” or even “Turks and Kurds” as they’ve been between “afraid of Erdoğan” and “afraid of what might replace him, because this is Turkey, and things can always get worse.” As hopeful as people are in the wake of the election — and they should be — those with longer memories understand that this is Turkey, and things can always get worse.

The election results have created a precarious situation. The AKP will be unable to form a government on its own. That is the open window in the attic. The reason this matters is that the constitutional reforms Erdoğan longed to effectuate — those that would have effectively transferred all remaining power into his hands — are probably now a dead letter. Now there is room to maneuver for those who oppose him. The opposition parties are, in fact, even in a good position to weaken or destroy him, and to reduce the AKP to a normal and useful political force. But this can happen only if they cooperate with the discipline and purpose of an Olympic synchronized swim team.

Unfortunately, these parties hate each other. All have a proven history of shooting themselves in the foot. Perhaps this once they can refrain from behaving with their characteristic short-sightedness. But Erdoğan got where he is precisely because they could never refrain before.

Consider all the ways things might get worse, and fast. The remaining parties must now somehow enter into a formal alliance and then obtain a vote of confidence. Minority governments are by nature unstable: They can lose the vote of confidence at any time, forcing an early election; and obviously, parties to a minority government are forced to compromise on the very issues most important to the constituencies that elected them.

Under Turkish law, Erdoğan, as president, now gives a mandate to someone he selects to transform this querulous rabble into a functional government. The designee has 45 days to conjure up the miracle; and failing this, the Constitutional Court will call for early elections, to be held 90 days henceforth.

We are now one week into the process. All three parties — MHP, CHP, and HDP — have repeatedly promised to refuse to enter a coalition with the AKP. If they keep their promises, they will not. But it would probably be more useful to consider every way the new entrants to parliament could break their promises, fail to serve the interests of their nation, and fail, indeed, to serve even their own interests — for that, alas, is what the historic record suggests they are apt to do.

A number of scenarios are plausible. The AKP may try to forge on alone, with a minority government, sowing dissension among the other parties to reduce the odds of their cooperation. Yet there are serious divisions in the AKP, both visible and below the surface. Given what is about to take place — including but not limited to the recriminations for the party’s poor electoral performance — these tensions could cause the party to implode. The scenario most likely to prevent this is an AKP-HDP alliance. Depending what he offers them, the HDP might allow Erdoğan, in exchange, to push through his one-man-leadership plan, and this despite everyone else’s objection to it.

Don't rule it out. Demirtaş has sworn he won't do it, but his party has objectives that only the AKP can deliver. Demirtaş in turn must deliver the goods to his supporters, and fast. His promises to work for all of Turkey, not just the Kurds, are promises; his interest is in working for his supporters. Only the AKP, for example, might entertain the notion of offering regional autonomy for the Kurds in exchange for Erdoğan’s elevation to an enhanced presidency. Erdoğan could even be so cynical as to dangle the prospect of freeing Abdullah Öcalan, the imprisoned founder of the separatist Kurdistan Workers’ Party or PKK, in exchange for the HDP’s cooperation. An AKP-HDP alliance, in other words, could result in outcomes that would thrill many Kurds; horrify the majority of the electorate; set the country alight; and result, despite everything, in Erdoğan, President for Life.

Another possibility is an AKP-MHP coalition. Their constituencies overlap, which in previous elections has worked in the AKP’s favor. The head of the MHP, Devlet Bahceli, said in a post-election speech that his party could not countenance an Erdoğan-style presidential system. We have to wait to see whether he means it. We must also wait to see how determined Erdoğan and his supporters are to hold to the goal of an unfettered presidency. Should they cut a deal, it will still be a shaky government not apt to last.

Now consider a scenario that might make sense to mature politicians of a genuine concern for the good of the whole of the nation: A HDP-CHP-MHP coalition. That is, at least, mathematically possible. It would hardly be a Behemoth; Erdoğan would still have a little less than half the seats in parliament. Still, a disciplined coalition focused on the overarching goal of proving that they are capable of governing competently – and by implication that there is no need for an Erdoğan dictatorship — would be a substantial achievement. It would also be a miracle. It is hard to imagine HDP and MHP deputies refraining from physically attacking each other long enough to take a lavatory break, no less govern.

Before agreeing to any minority government scenario, Erdoğan will demand and receive ironclad guarantees that the corruption investigation he quashed will stay quashed. A CHP-MHP-HDP coalition would have the required number of seats to reopen the corruption case. Erdoğan would not leave something like that to chance, and holds enough cards to drive a hard and bitter bargain before allowing it. (Among the cards he holds is that for a government to be formed, it needs approval by the president. Erdoğan is the president.)

Or the AKP could stay out and tap the CHP to form a government. This is probably possible only if he agrees to give up the goal of the executive presidency. If he refuses, it will force early elections. Or he could simply wait for all of these negotiations to fall apart. This too leads to early elections.

Erdoğan might sensibly bet that in all of these scenarios, the country will remember why they soured on fractious coalition politics in the first place. The next election, then, would undercut support for this election’s biggest winners, the HDP and the MHP. Indeed, it wouldn’t take much to push HDP back under the threshold. The so-called soft-HDP and soft-MHP supporters would reattach themselves to the AKP. This scenario is the shrewdest option for Erdoğan; and sadly, one thing Erdoğan is not is dumb.

No matter what happens, Erdoğan has already done enough damage to Turkey’s democracy that when he comes back fighting, it will be in full battle-rattle. He has by now firmly arrogated powers normally reserved for the prime minister, including the chairing of cabinet meetings and the choosing of much of the party list for parliamentary elections. His shadow cabinet runs out of the presidential office. Turks have come to refer to Erdoğan and his hangers-on as “the Palace.” The AKP’s internal term limits mean that powerful party lifers who couldn’t stand for a fourth term will move to the Palace, further weakening the rival power centers. Erdoğan has already so compromised the judiciary, prime ministry, and parliamentary system that a minority government — especially one with a limited mandate — will be consumed by the task of protecting its prerogatives from his predations.

The electoral setback will of course intensify the AKP’s own divisions. People won't know who's in charge, who's running the country, who's up and who's down. This instability will be reflected in every aspect of governance. Historically, Turks hate this, and for good reason. Turks are moreover deeply apprehensive about their neighborhood, concerned by the foreign and home-grown lunatics who use Turkey as the Highway Jihad Express to Syria, and by the hundreds of thousands of Syrian refugees, a huge economic burden and a source of social strain. The long Syrian-Turkish border is a combat zone. Syria and Iraq are providing strategic depth to Turkey’s Kurdish separatists. A government that looks as if it is losing further control of this situation will not be popular.

Moreover, the next few months will inevitably shock the Turkish economy. It is already one of the most fragile of the big emerging markets. This election made billions of dollars in market capitalization evaporate; the stock exchange took a six per cent dive; the lira dropped more than five per cent. Foreign investors are spooked by the uncertainty. The price of gas, water, and electricity will increase. A shrewd, power-hungry, and self-interested Erdoğan — that is to say, the only one we’ve ever known —could easily use this to his advantage. So don't write him off too quickly. Polls are already suggesting that were there a fresh election today, the AKP would regain three or four percentage points.

But don’t assume he can survive this handily, either. If the opposition is responsible and strategic, they will cooperate in pursuit of what should be their highest priority: ensuring this election was no mere speed bump on the route to Erdoğan’s Great Authoritarian Dream.

Should they fail to focus on that goal alone, though, the inevitable chaos will bring him back: "I told you so,” he will say. “Enough ineffective parliamentary democracy. Give me all the power, and I'll take care of business.”

For that is how fascists always do it, isn’t it?

Claire Berlinski lives in Paris. She is a senior fellow for Turkey at the American Foreign Policy Council and a Manhattan Institute scholar.