The main bone of contention is whether Islamic injunctions are legal or moral categories. When Muslims say Islam commands daily prayers or bans alcohol, are they talking about public obligations that will be enforced by the state or personal ones that will be judged by God?

For those who believe the former, Saudi Arabia might look like the ideal state. Its religious police ensure that every Saudi observes every rule that is deemed Islamic: women are forced to cover themselves, men are forced to frequent the mosque, and everyone is barred from anything considered sinful. Yet members of the Saudi elite are also famous for trips abroad, where they hit wild nightclubs to commit the sins they can’t at home. And while this is their civil right, it raises the question of whether Saudi Arabia’s intense piety is hypocritical.

By contrast, rather than imposing Islamic practices, the ultra-secular Turkish Republic has for decades aggressively discouraged them, going so far as to ban head scarves. Yet Turkish society has remained resolutely religious, thanks to family, tradition, community and religious leaders. Hence in today’s Turkey, where one has the freedom to choose between the bar and the mosque, many choose the latter — based on their own consciences, not the dictates of the state.

Yet even in Turkey, where democracy is rapidly being consolidated under Prime Minister Recep Tayyip Erdogan’s Justice and Development Party, known as A.K.P., there are reasons to worry that illiberal democracy could emerge. For Turkey still suffers from a paranoid nationalism that abhors minority rights, a heavy-handed judiciary designed to protect the state rather than its citizens, and an intolerant political culture that regards any criticism as an attack and sees provocative ideas as criminal.

These obstacles to liberal democracy are unrelated to religion though; they are the legacy of years of secular but authoritarian politics. But the A.K.P., which has been in power for almost a decade and has introduced important liberal reforms, has lately let its progressivism wane. The party has absorbed some of the traditional illiberalism of the establishment in Ankara, the capital, that it now fully dominates. It has not been too Islamic; it is just proving to be too Turkish.