Saudi Arabia recently declared atheism and Islamist terrorism equal crimes in the eyes of the law. To the Saudi government, not believing in God, and fighting in his name – although polar opposites – represent the same threat, a challenge to the religious consensus. What is it about atheism that it finds so challenging? And are different types of atheism possible in the Muslim world?

Despite the prominence of the image of a hunted apostate supported by western atheists and villified by Islamic institutions, there are atheists of Muslim heritage who would not necessarily identify with this stereotype. I would make the distinction between individual atheism as a matter of belief, and the position of publicly declaring oneself atheist – or, more potently, "ex-Muslim". The former is a personal position, the latter a political one that seeks to challenge authority.

In my experience, when it comes to atheism in the Muslim world, there is a conspiracy of sorts, akin to the "don't ask don't tell" principle on homosexuality in the US military –if a Muslim has lapsed, and no longer believes in God, there is no censure of that as long as one does not proselytise. Indeed, a 2012 poll by WIN-Gallup International found that up to 5% of Saudis polled identified as atheist, according to Sultan al-Qassemi, a number "comparable to the US and parts of Europe".

However, these atheists are almost anonymous in the public sphere, only "out", at most, to their families and friends. The stress of going through the motions of belief, in societies steeped in religion, cannot be overestimated. Practically speaking, being an atheist in certain parts of the Muslim world, or even in certain Muslim families in the west, involves a lot of dissimulation and tongue biting.

But while having to perform acts of faith when one has none can take a severe mental toll, there are also those who have not prayed, fasted, or stepped inside a mosque in years without being challenged.

This is where the tension between being an atheist and ex-Muslim become clear. Few people define themselves as "ex-Christian" or "ex-Jewish". The "ex-Muslim" tag is an identity, a refuge, a political statement that is not to be confused with simple lack of belief in God.

It is also one that finds common cause with a new tradition of western atheism, one that couches its position more in the public rejection of religion than simple non-belief. The difference is that the former can thrive in a secular society, where communities have become weaker and individuals revel in self-expression. Muslim societies are quietly tolerant of rebellious acts of all kinds, from the sexual to the religious. But because religion, family, society and politics are built around community, to be a declared atheist in the public space is to make a stand against the fabric of society.

Despite the death penalty for apostasy in Islamic law – a sentence only ever likely to be brought into play, where not politically or mischievously motivated, by public declarations of anti-theism – it is still possible to be an atheist without necessarily rejecting a Muslim cultural identity and heritage. The analogy is with those atheists of Christian heritage who still want to get married in church, baptise their babies, and can appreciate the importance or need for religion in others.

To not acknowledge that atheists of Muslim heritage might choose to do the same is to further limit the possibility of a healthy pluralistic Islam, one not just made up of believers and apostates.

The way Muslim authorities, from governments to extended families, grandstand on "apostasy" shows us that what needs to be challenged is this appropriation of religion in order to control. But just as Muslims need to expand tolerance for non-belief into the public sphere by challenging the structures that define this space, westerners energised by the ex-Muslim's fate need to see that there is more than one model of not believing in God.