Last December, Dar Al Ifta, a venerable Cairo-based institution charged with issuing Islamic edicts, cited an obscure poll according to which the exact number of Egyptian atheists was 866. The poll provided equally precise counts of atheists in other Arab countries: 325 in Morocco, 320 in Tunisia, 242 in Iraq, 178 in Saudi Arabia, 170 in Jordan, 70 in Sudan, 56 in Syria, 34 in Libya, and 32 in Yemen. In total, exactly 2,293 nonbelievers in a population of 300 million.

Many commentators ridiculed these numbers. The Guardian asked Rabab Kamal, an Egyptian secularist activist, if she believed the 866 figure was accurate. “I could count more than that number of atheists at Al Azhar University alone,” she replied sarcastically, referring to the Cairo-based academic institution that has been a center of Sunni Islamic learning for almost 1,000 years. Brian Whitaker, a veteran Middle East correspondent and the author of Arabs Without God, wrote, “One possible clue is that the figure for Jordan (170) roughly corresponds to the membership of a Jordanian atheist group on Facebook. So it’s possible that the researchers were simply trying to identify atheists from various countries who are active in social media.”

Even by that standard, Dar Al Ifta’s figures are rather low. When I recently searched Facebook in both Arabic and English, combining the word “atheist” with names of different Arab countries, I turned up over 250 pages or groups, with memberships ranging from a few individuals to more than 11,000. And these numbers only pertain to Arab atheists (or Arabs concerned with the topic of atheism) who are committed enough to leave a trace online. “My guess is, every Egyptian family contains an atheist, or at least someone with critical ideas about Islam,” an atheist compatriot, Momen, told Egyptian historian Hamed Abdel-Samad recently. “They’re just too scared to say anything to anyone.”

While Arab states downplay the atheists among their citizens, the West is culpable in its inability to even conceive of an Arab atheist. In Western media, the question is not if Arabs are religious, but rather to what extent their (assumed) religiosity can harm the West. In Europe, the debate focuses on immigration (are “Muslim immigrants” adverse to secular freedoms?) while in the United States, the central topic is terrorism (are “Muslims” sympathetic to it?). As for the political debate, those on the right suspect “Muslims” of being hostile to individual freedoms and sympathetic to jihad, while leftists seek to exonerate “Muslims” by highlighting their “peaceful” and “moderate” religiosity. But no one is letting the Arab populations off the hook for their Muslimhood. Both sides base their argument on the premise that when it comes to Arab people, religiosity is an unquestionable given, almost an ethnic mandate embedded in their DNA.

The 26-year-old Palestinian author Waleed Al Husseini was imprisoned for ten months after Palestinian authorities believed his pro-atheism blog posts were a “threat to national security.” He now lives in Paris. Boris Allin

The Arab Spring may have stalled, if not receded, but when it comes to religious beliefs and attitudes, a generational dynamic is at play. Large numbers of individuals are tilting away from the rote religiosity Westerners reflexively associate with the Arab world. In 2012, a wide-ranging WIN/Gallup International poll found that 5 percent of Saudi citizens—more than a million people—self-identify as “convinced atheists,” the same percentage as in the United States. Nineteen percent of Saudis—almost six million people—think of themselves as “not a religious person.” (In Italy, the figure is 15 percent.) These numbers are even more striking considering that many Arab countries, including Saudi Arabia, the United Arab Emirates, Sudan, and Yemen, uphold the sharia rule punishing apostasy with death.

Capital punishment, however, is almost never put into practice; the convicted atheists spend varying periods in jail before being granted an opportunity to recant. Arab countries with no apostasy laws still have ways to deter the expression of religious disbelief. In Morocco and Algeria, prison terms await those convicted of using “means of seduction” to convert a Muslim. Egypt resorts to wide interpretations of anti-blasphemy laws to condemn outspoken atheists to jail. In Jordan and Oman, publicly leaving Islam also exposes one to a sort of civil death—a set of legal measures including the annulment of marriages and the stripping of inheritance rights.

Officially sanctioned punishments can be severe. This January, a 21-year-old Egyptian student named Karim Al Banna was given a three-year jail sentence for “insulting Islam,” because he declared he is an atheist on Facebook. His own father testified against him. In February 2012, Saudi writer Hamza Kashgari was imprisoned for almost two years without trial over three tweets addressing the prophet Muhammad; the most controversial was, “I will not bow to you. I shall not kiss your hand. Rather, I shall shake it as equals do.” The following month, a Tunisian tribunal sentenced bloggers Ghazi Beji and Jabeur Mejri to seven years for “transgressing morality, defamation and disrupting public order,” after they posted satirical comments and cartoons of the prophet Muhammad. Last year, Raif Badawi, the founder of Free Saudi Liberals, a blog discussing religion, was sentenced to ten years in prison and 1,000 lashes. And last December, Mauritanian columnist Mohamed Cheikh Ould Mkhaitir was sentenced to death for penning a critique of his country’s caste system which traced its mechanisms back to decisions made by the prophet in the seventh century. The sentence is pending appeal.

Despite such draconian measures, the percentage of people who express some measure of religious doubt is higher in the Arab world (22 percent) than in South Asia (17 percent) and Latin America (16 percent). And that 22 percent is only an average; the percentage goes higher in some Arab countries, from 24 percent in Tunisia up to 37 percent in Lebanon. Considering the extent to which the Arab social and political environment impedes the expression of non­belief, the numbers of doubters and atheists would likely be significantly higher if people felt freer to speak their minds. In January, Egyptian atheist activist Ahmed Harqan told Ahram Online, “If the state preserved and protected the rights of minorities, the numbers of those who reveal they’re atheists would increase tenfold.”

In the spring of 2011, the Arab world was experiencing a regionwide revolutionary convulsion. In Tunis, Cairo, and elsewhere in the Middle East and North Africa, thousands of young people took over public squares, demanding new freedoms. At the same time, Waleed Al Husseini was in a jail cell in Qalqiliya in the Palestinian West Bank. The 22-year-old had been arrested a few months earlier in a cybercafé by Palestinian intelligence agents. Al Husseini was at the café because he had decided not to blog from his home because of threats he’d received for posts on his blog Noor Al Aqel, or the Light of the Mind.

As The New York Times reported, Al Husseini had “angered the Muslim cyberworld by promoting atheism, composing spoofs of Koranic verses, skewering the lifestyle of the Prophet Muhammad and chatting online using the sarcastic Web name God Almighty.” He told me he was brought before a military court because his online atheism was considered a “threat to national security.”

Al Husseini was locked up for ten months, during which he was physically abused and endlessly interrogated. Of the hundreds of questions he was asked, one stuck in his mind: “Who finances your atheism?”

“Posting my thoughts on a blog obviously didn’t require any financing,” Al Husseini told me. “But the question was an indication of their utter inability to understand that renouncing Islam was my personal choice, just as it could be anyone else’s—including them. In their minds, there had to be a foreign conspiracy behind this, preferably led by Israel. That was the only way my atheism could make sense for them.”

Al Husseini was eventually freed and fled to Jordan, where he sought refuge in the French Embassy. Today he lives in Paris and has published a memoir, Blasphémateur! Les Prisons d’Allah (Blasphemer! The Prisons of Allah). After the Charlie Hebdo massacre, he wrote an op-ed in the French daily Libération defending the slain cartoonists’ freedom of speech. The headline the editor put on it was, “I, a Muslim, Commit to Secularism.” Al Husseini, who by then had already published his memoir as an atheist and a blasphemer, commented in an amused tone, “They probably thought that putting ‘Muslim’ and ‘secularism’ together in the same sentence was bizarre enough to trigger interest.”

During a 2014 appearance on HBO’s “Real Time with Bill Maher,” American author Sam Harris, a pillar of the New Atheism movement, fell into the same essentialist trap when he referred to “Muslims who are nominal Muslims who don’t take the faith seriously.” One can only marvel at the oxymoronic complexity of that sentence. If these people don’t take Islam seriously, why then call them Muslims, “nominal” or not?

Religiously motivated trials like Al Husseini’s are always a serious affair, with the accused considered not just an enemy of God, but also of the state. All Arab regimes use religion, to various extents, as a source of legitimacy. The expression of disbelief represents, for them, an existential threat. In 2014, Saudi Arabia went as far as listing atheism and questioning the Islamic faith as terrorist acts. There is an understandable logic behind the move. “Saudi Arabia depends greatly on religious credentials, since its basic law roots the regime in Wahhabi Islam,” Whitaker, the author of Arabs Without God, told me. “If you are an atheist in Saudi Arabia, you are also a revolutionary. If atheism is allowed to flourish, the regime won’t be able to survive.”

It’s not just the authorities that consider disbelief a problem. Arab societies as a whole are not wired to accept declared atheists in their ranks. The first reason for Arab atheists to keep quiet is to not upset their relatives. Amid omnipresent religious references, claiming that you don’t believe in God is hardly seen as an expression of your singularity. Rather it is considered a challenge to society in its entirety. Religiosity in the Arab world is not just mainstream; it is the norm, to which one is supposed to adhere unquestionably, or else be deemed a “deviant”—the literal translation of mulhid, the most-used Arabic term for atheist. And since religion is seen as the cradle of morality, godless people are assumed to be devoid of a moral compass. Whitaker cites Mohammed Al Khadra, a Jordanian atheist and civil society organizer, who said, “The main view is that if someone is ... an atheist then he must be living like an animal. That’s how they see us. I have been asked so many times why wouldn’t I sleep with my mother?”

It’s even more problematic when the nonbeliever is female. “The popular association of atheism with immorality is a particular deterrent for women who have religious doubts, since in Arab society they are expected to be ‘virtuous’ and not rebellious in order to marry,” Whitaker wrote in his book.

In such a milieu, one would assume the vast majority of Arab people are devout religious practitioners. The fact of the matter is, except in relatively small ultra­religious circles, secular lifestyles and attitudes are largely tolerated in the Arab world. For example, though forbidden in Islam, drinking alcohol is commonplace, particularly among the educated middle and upper classes. Until recently in Morocco, a country that produces large quantities of wine (alongside Algeria, Tunisia, Egypt, Lebanon, and Jordan), alcohol was sold in a super­market chain owned by King Mohammed VI, also known as the Commander of the Faithful. In a recent speech, Nabil Al Fadhl, a Kuwaiti member of parliament, deplored his country’s prohibition of alcoholic beverages, in effect since 1964, for driving young people to drink clandestinely manufactured—and thus dangerous—beverages.

Sex outside of marriage, another practice prohibited by Islam, is also unexceptional, especially in urban environments where genders have been mixing in the public space for more than half a century. In Morocco, a study determined that 800 clandestine abortions (presumably prompted by out-of-wedlock pregnancies) are performed on any given day.

Likewise, while Islam requires its followers to pray five times a day at fixed times, including twice during working hours, believers typically skip the prayers while they’re at work and perform them once back home. In Saudi Arabia, one of the most zealous Arab countries when it comes to religious protocol, shops have to close for about 15 minutes at each prayer call to allow the customers to perform their religious duty. But you can often see small crowds of people gathered on the sidewalk and waiting idly—some taking a cigarette break—until the shops reopen.

In today’s Arab world, it’s not religiosity that is mandatory; it’s the appearance of it. Nonreligious attitudes and beliefs are tolerated as long as they’re not conspicuous. As a system, social hypocrisy provides breathing room to secular lifestyles, while preserving the façade of religion. Atheism, per se, is not the problem. Claiming it out loud is. So those who publicize their atheism in the Arab world are fighting less for freedom of conscience than for freedom of speech.

It hasn’t always been so. Since the 1960s, larger-than-life Arab intellectuals, such as Palestinians Edward Said and Mahmoud Darwish and the Syrian Ali Ahmad Said Esber, also known as Adonis, haven’t shied away from challenging religious orthodoxy. Abdullah Al Qasemi, a Saudi writer who died in 1996 and is considered the godfather of Gulf atheists, famously declared, “The occupation of our brains by gods is the worst form of occupation.” Back then, such statements were much less of a problem. As the Associated Press’s Diaa Hadid reported in 2013, “In the 1960s and 1970s, secular leftists were politically dominant. It wasn’t shocking to express agnosticism. ... But the region grew more conservative starting in the 1980s, Islamists became more influential, and militants lashed out against any sign of apostasy.”

Abdel-Samad, the Egyptian historian, experienced this firsthand. Today, at 43, he is a declared atheist, but he was an enthusiastic member of the Muslim Brotherhood in his university days. But while he was attending a summer camp run by the Brotherhood, doubts started to creep in. “It was meant to be some sort of collective physical and spiritual effort,” he told me. “We were each given an orange and instructed to walk in the heat for hours. After an exhausting journey in the desert, we were ordered to peel the orange. We were happy to finally get something to quench our thirst. But then, our group leader ordered us to bury the fruit in the sand, and eat the peeling. I felt utterly humiliated. The objective was obviously to break our will. This is how you make terrorists. I left the Brotherhood soon after that.” In 2013 an Egyptian extremist cleric appeared on television and issued a death fatwa against Abdel-Samad after he’d asserted that Islam had developed fascist tendencies since the time of the prophet.

Egyptians marking the end of the monthlong fast of Ramadan with prayers at the Al Azhar Mosque. Its affiliated university has been among the world’s foremost authorities on Sunni Islam for almost 1,000 years. Mohammed Hossam / Anadolu Agency / Getty Images

Why are more Arabs turning their backs on religion? The New York Times’ Thomas Friedman argued in a column last December that the horrors committed in the name of Islam by terrorist groups like ISIS are to blame. This reflects the mindset of many American pundits, for whom terrorism is central to all things Middle East. In reality, repudiating terror is rarely the motivation of those who veer from Islam. “While researching my book ... I spent a lot of time trying to find out why some Arabs turn to atheism and none of those I spoke to mentioned terrorism or jihadism as a major factor,” Whitaker wrote. “That’s not particularly surprising, because atheism is a rejection of all forms of religion, not just the more outlandish variants of it.”

For the vast majority of Arab atheists, the road to disbelief begins as it did for Abdel-Samad, with personal doubts. They start to question the illogicalities found in the holy texts. Why are non-Muslims destined to hell, even though many of them are nice, decent people? Since God knows the future and controls everything, why would he put some people on the wrong path, then punish them as if he had nothing to do with their choices? Why is wine forbidden, yet virtuous Muslims are promised rivers of it in heaven? Such questions began bugging Amir Ahmad Nasr, Sudanese author of My Isl@m: How Fundamentalism Stole My Mind—and Doubt Freed My Soul, when he was twelve, and he brought them to his sheik, the imam of a mosque in Qatar. The answer he received—that doubting God’s commandments is haram (religiously illicit) and can only be inspired by the devil—only prompted him to continue digging. As Islam Ibrahim, the founder of an Arab atheist Facebook page, said: “I wanted to secure a spot in paradise, so I started studying the Quran and Muhammad’s teachings. But I found a lot of contradictory and bloody things and fantasies in it. ... Anyone who uses his brain five minutes in a neutral way will end up with the same conclusion.”

Al Husseini, the Palestinian blogger, recalled his journey after he decided to leave Islam. “I began reading the books I could get my hands on,” he said. “The discovery of the elementary notion of evolution was mind-­blowing. Books like Dawkins’s The God Delusion and Darwin’s The Origin of Species opened my eyes to a whole new paradigm.” The 24-year-old Moroccan atheist activist Imad Iddine Habib told me that he read books by American astrophysicist Carl Sagan.

The story of Iman Willoughby illustrates the second-­most frequently cited reason, after doubting, for Arab citizens to turn to atheism: The oppression they personally experienced in the name of religion. Willoughby today is a happily married 39-year-old mother of two with her own massage clinic in Nova Scotia. But she went through a two-decade nightmare in her country of origin, Saudi Arabia. Physically abused by a father who broke her bones and a stepmother who chased her with knives, Willoughby was jailed twice by the Saudi religious police. The first time, she was spotted unveiled near a stream outside her hometown Riyadh. “It was an isolated place, I liked to go there and just close my eyes, feel the wind in my hair,” she told me. But since females aren’t allowed to drive in Saudi, a male driver had to take her. The day the religious police caught her unveiled, they accused her of having an illicit relationship with the driver. She spent three days in a police station before her father came to free her—and then “beat the living life out of me,” she said.

The second arrest happened a few years later, while Willoughby was in medical school. The university was a 45-minute drive from home, and one night her driver didn’t show up. A male student offered her a ride, and while they were crossing a small desert town, the religious police forced them to stop. They beat Willoughby’s classmate unconscious and took her to a police station, where they forced her, under threat of physical abuse, to sign an “admission statement” that she was sleeping with her friend. Three months of imprisonment and “religious reeducation” followed, during which mandatory prayers were the only distraction from the cell she occupied, with nothing in it but a mattress on the floor, persistent cockroaches, and a video camera constantly filming her. She received no word from her family or friends. Willoughby was eventually freed, only to find out that she had been convicted and sentenced to 80 lashes. Her brother interceded before a prince—“not because he cared for me, only to salvage the honor of the family,” she said—and she was pardoned.

Before prison, Willoughby had applied for a scholarship to continue medical school in Canada. She obtained it, begged her father to give her her passport (a scene she recalled as her “ultimate humiliation”) and left forever. Her atheism? It had felt like a natural calling for a long time. “I never really prayed in my life,” she told me. “Even in jail, I was just going through the motions to keep people quiet.”

“Religion is a form of surveillance,” said Habib. “It’s not about God; it’s about the power wielded by those who act in his name.” Habib, Willoughby, and many others have switched to atheism as an act of rebellion. But their rebellion is less against Islam than against the abuses committed by religiously powered individuals and political systems.

Many Arab atheists weren’t political at first. But it seems there is just no way around it. Momen told Abdel-Samad he didn’t mean to politicize his atheism. “But when people’s faith is political, my lack of it is just as political, by definition,” he said. “As long as unbelievers are persecuted, as long as religion encroaches on people’s private lives, I can’t reject it purely as a private matter.” And since politics is around the corner anyway, might as well do it well—and straight-faced. That’s the conclusion Egyptian atheist activist Islam Ibrahim shared on the YouTube program “The Black Ducks.” Started in August 2013 by another Egyptian atheist, Ismail Mohamed, the program invites atheists from the Arab world to speak their minds. When you’re anonymous, you can say silly things and not be held accountable for them, Ibrahim said on the program. “I thought, if we atheists stop being ghosts and materialize, we will be taken more seriously, because our statements will become better thought through. Also, we’ll never get what we want if we don’t have the courage to claim it with our real names and faces.”

As of mid-April, more than 140 “Black Ducks” episodes have been uploaded, and they’ve received hundreds of thousands of views. The channel has two objectives: Achieving “a secular society in the Middle East and North Africa. ... [and offering] solace and courage to those who are atheists in secret so they may know they are not alone in the world.” In the episode featuring him, Ibrahim said: “Your brother, co-workers, friends, family members might be atheists, just like you, but they’d never dare say, unless they see you come out on Facebook. It actually happened with my neighbor. We became friends in real life, as it happened for many.” Toward that end, Ibrahim established a Facebook page where hundreds of Arab atheists posted their stories, including their names, photographs, countries of residence, and the reason behind their atheism.

Being connected to each other is crucial to Arab atheists. After Willoughby started her blog and Twitter feed in 2008, she said, numerous strangers reached out to her, thanking her for sharing her story, and anxiously asking for advice about how to deal with their own personal predicaments. To her, it felt like duty calling. Willoughby said she has helped a dozen atheists get out of Saudi Arabia by giving them access to information, and even sending money in some cases.

In 2007, a now-worldwide network of “ex-Muslims” was established to support refugees, exiles, and anyone from a Muslim background. The first such group was created in Germany at the initiative of Iranian exiles vowing to support the freedom to criticize religion and to end “religious intimidation and threats.” There are now chapters in several countries including the United States, Canada, the United Kingdom, Germany, France, Belgium, and New Zealand. There is no central body, and each chapter runs independently, but they collaborate on conferences and advocacy campaigns. Many of the ex-Muslims’ activities are conducted online, but a good deal also happen in real life, which elicits security concerns. “If you’ll be holding real life meetings, you should screen each person who wants to join for safety’s sake,” Kiran Fatima Opal, a Canadian-­Pakistani active member of the ex-Muslims of North America, told me.

Habib started the ex-Muslims group in Morocco, which has about 20 members, and he has given news conferences alongside other activists. One last summer launched a campaign to gain the right to abstain from fasting during Ramadan (breaking the Ramadan fast in public is a criminal offense in Morocco, punishable by one to six months in prison.) “I created the Council of ex-Muslims so we’d stop saying, ‘We are with the atheists,’ and start saying, ‘We are the atheists,’” Habib told me. “Like for gays, [the] time has come to claim ‘atheist pride.’” Habib came to the attention of the public in March 2013. The police were looking for him, apparently to indict him because he had mocked the Islamic creed, “There is no god but God,” on his Facebook page by turning it into, “There is no god but Mickey Mouse.” Instead of turning himself in, he went into hiding while a support campaign was taking off on the Internet. By the time he resurfaced, the police had apparently given up on bringing him in. His relative international exposure (Western journalists such as The New York Times’ Nicholas Kristof had interviewed him) may be what has shielded him from arrest so far.

Despite the risks and the social and political challenges they’re facing, all the atheist activists I interviewed said they were confident that the future of the Arab world belongs to secularism. Willoughby told me that “atheism is spreading like wildfire” in the Middle East. Brian Whitaker views it as “the symptom of a much bigger thing, which is the battle against oppression.” The booming Arab underground music scene is another example of the irresistible impetus for change that is quietly transforming the Middle East and North Africa. A full cultural revolution will probably take some time. Speaking about his country, Abdel-Samad said, “I think secularism is a certainty, not just a possibility, for Egypt’s future. All that remains unclear is what price the country will pay first. History tells me blood.”

Waleed Al Husseini told me that he’s “pessimistic for the next 20 years, but optimistic for what’s coming afterwards.” He can afford it: By then, he’ll be only 46.