Most reasonable people would agree that the administration of Turkish President Recep Tayyip Erdoğan has been heading, alarmingly, towards authoritarianism.

Erdoğan has been accused of imprisoning journalists, censoring the media, attempting to exert political influence over the courts, and using the security services for his own purposes. He has pushed through revisions to the country’s constitution, arguably in his favor. He served as Turkey’s prime minister for more than a decade before becoming president.

But there is one fact that is difficult to reconcile with this chain of events. Included as part of Turkey’s recent agreement with the EU on Syrian refugees was a little-noticed, and even less-discussed, provision: resumption of Turkey’s EU accession negotiations.

On the face of it, it is a paradox. If Turkey is becoming increasingly authoritarian, why on earth is Erdoğan attempting to re-open accession negotiations? After all, part and parcel of EU accession negotiations is an intrusive and meticulously verified set of requirements for democratic reforms.

Is Erdoğan schizophrenic? Was the measure adopted by the Turkish government despite Erdoğan’s opposition? Or, just possibly, is Erdoğan misunderstood?

I would argue the latter – and that there is a distinct possibility of a Turkish turnaround.

It is undeniable that Erdoğan has shown authoritarian tendencies. But he has also been misunderstood, for two reasons. First, his rhetoric is worse than the reality; and second, he has been pushed by circumstances into his authoritarian role.

On the topic of Erdoğan’s rhetoric, he suffers the problem of any politician who relies on pious supporters: he’s scary when playing to his base.

Of course, it is not only Erdoğan who has such a problem. When US President George W. Bush famously announced the existence of an “axis of evil,” lumping together Iran, Iraq and North Korea, to much of the world he sounded like a lunatic. The statement’s fairytale quality aside, the grouping did not make much sense.

But then, the statement was not aimed at the rest of the world; it was aimed at Bush’s pious, conservative base, and they loved it – Bush would go on to repeat the phrase many times.

Erdoğan’s political base, like that of George W. Bush, is God-fearing, conservative, and pro-business – the rising middle class of Turkey’s Anatolian heartland – and when Erdoğan plays to this base, his rhetoric is inevitably jarring. But it sounds worse than it is.

Bear in mind, moreover, a second and even more important point: Erdoğan did not show serious authoritarian tendencies when he first took power. Quite the contrary. He started out as a liberal reformer, pushing Turkey towards European Union membership.

EU accession has helped to transform many countries in Eastern Europe, raising the quality of governance and promoting convergence of incomes on a wealthy Western European standard. In the early days of Erdoğan’s administration, the EU accession process looked set to do the same for Turkey.

Perhaps surprisingly, Erdoğan and his supporters seemed all in favor of this transformation. The Anatolian middle class, pious and conservative though they were, supported the EU-sponsored program of liberal reform because it released the stranglehold of Turkey’s oligarchic business elite on the nation’s economy. This elite controlled vast business conglomerates that maintained extensive links with banking and politics.

Turkey’s EU accession process, formally confirmed in 1989, helped to produce, under Erdoğan’s administration, significant and measurable improvements in Turkey’s regulatory quality, rule of law, government effectiveness, and control of corruption (according to the World Bank governance indicators). The resulting economic liberalization allowed Turkey’s new middle-class to rise.

And then, in the 1990s and early 2000’s, the EU pulled the rug out from under Erdoğan. France passed a constitutional amendment stating that Turkish accession would require a referendum. Germany began to get cold feet. And Cyprus, seeing its opportunity, stepped in to block negotiations on several areas.

The domestic coalition that Erdoğan had assembled for liberal reform, which awkwardly lumped together his Anatolian supporters with some of the more outward-looking of Turkey’s business conglomerates, fell apart. Seizing on this weakness, Erdoğan’s opponents began to attempt to roll back his reforms.

I do not wish to excuse Erdoğan’s response, which was to lurch towards authoritarianism. Even if his motives were sometimes understandable (the Turkish conglomerates that had suffered from reforms controlled some of the country’s media) his actions were unjustifiable (he responded by imprisoning journalists and censoring media coverage).

But the chequered history of Turkey’s EU accession efforts, for which the EU shares as much blame as Erdoğan, explains the apparent paradox – why Erdoğan, though superficially authoritarian, now appears to be trying to get the country’s EU accession back on track.

It also offers hope for Turkey’s future. Brilliantly, if cynically, the Turkish government has cut a deal with the EU that reopens accession negotiations, using the Syrian refugee crisis as bargaining leverage. It is possible that if the accession process does get back on track, Erdoğan can return to his original liberalism – or better yet, retire.

Admittedly, it would be risky to bet on Turkey at this point. The country’s economy is spectacularly exposed to global shocks due to its reliance on foreign capital.

But, just possibly, the much-criticized refugee deal could mark the beginning of a Turkish turnaround.

[post-coup update: I really need to stop wishing for the best for Turkey (a lifelong habit). That said, I’m still an optimist — if the EU deal holds together, I think a turn for the better is the most likely scenario.]