In 1924, a year after founding the Turkish Republic on the ruins of the Ottoman Empire, Mustafa Kemal Atatürk, the country’s new leader, abolished the Ottoman Caliphate, which had been the last remaining Sunni Islamic Caliphate since 1517. Having introduced a secular constitution and a Western-style civil and criminal legal code, Atatürk shut down the dervish lodges and religious schools, abolished polygamy, and introduced civil marriage and a national beauty contest. He granted women the right to vote, to hold property, to become supreme-court justices, and to run for office. The head scarf was discouraged. A notorious 1925 “Hat Law” outlawed the fez and turban; the only acceptable male headgear was a Western-style hat with a brim. The Ottoman Arabic script was replaced by a Latin alphabet, and the language itself was “cleansed” of Arabic and Persian elements.

At the time, my grandparents were either very young or not yet born. Only my mother’s father was old enough to remember throwing his fez in the air on the Sultan’s birthday. My parents were born into a secular country. They met in Turkey’s top medical school, moved to America in the nineteen-seventies, and became researchers and professors. Both were, and continue to be, passionate supporters of Atatürk. I grew up hearing that if it hadn’t been for Atatürk my grandmother would have been “a covered person” who would have been reliant on a man for her livelihood. Instead, she went to boarding school, wrote a thesis on Balzac, and became a teacher. I felt grateful to Atatürk that my parents were so well educated, that they weren’t held back by superstition or religion, that they were true scientists, who taught me how to read when I was three and never doubted that I could become a writer.

My father grew up in Adana, not far from the Syrian border. His family was Alevi—part of Turkey’s Shia minority—and one of his earliest memories was waking up to hear his grandfather reciting the Koran in Arabic. My father experienced his first religious doubts at the age of twelve, when he discovered Bergson and Comte in an Adana bookstore, and read that religion was part of a primitive and pre-scientific state of civilization; he has been an atheist since his teens. My mother grew up in Ankara, Atatürk’s capital. Her father, one of the civil engineers who helped to modernize Anatolia, was politically a staunch secularist and privately a devout Muslim (though not a proponent of head scarves, which nobody in the family wore). In grade school, my mother read what the Koran said about skeptics—that God would close their eyes and ears—and got so depressed that she didn’t get out of bed for two days. Her parents told her that God was more merciful than she thought, and that people who did good would go to Heaven on the Day of Judgment, regardless of what they believed. I have always known my mother as an agnostic, less certain than my father that the universe hadn’t been created by some great intelligence. But she would get even more annoyed than my father did when she thought that people were invoking God to do their jobs for them—for example, when she saw a bus with a sticker saying “Allah Protect Us.”

Both my parents always told me that, in order to be a good person, it was neither necessary nor desirable to believe in God; it was more noble and efficient to do good for disinterested reasons, without thoughts of Heaven. Nothing in the milieu where I grew up, in New Jersey in the eighties and early nineties, contradicted the idea I formed of religion as something unnecessary, unscientific, provincial—essentially, uncool. For a long time, I thought there was an immutable link between coolness and positivism. I thought this was the way of the world. Then came identity politics and, in Turkey, the rise of the Justice and Development Party (A.K.P.), a center-right party with Islamist roots. Its charismatic leader, Recep Tayyip Erdoğan, has been the head of state since 2003, after the A.K.P. won its first landslide victory.

Suddenly, it was the secularists who seemed stodgy: racist, authoritarian, élitist, and slavishly pro-Western. The Times started referring to them as “the secular elite.” In 2007, the Times reported that a protest of the A.K.P. by hundreds of thousands of Turkish secularists was motivated in part by a “fear” of the life styles of their more religious compatriots—by “snobbish” complaints that “religious Turks were uneducated and poor” and that “their pesky prayer rugs got underfoot in hospital halls.” It’s difficult to imagine the Times reporting in an equally condescending manner about the élitism of Americans who oppose the Christian right. The Western view of Erdoğan eventually soured, especially after the Gezi protests of 2013; he was criticized for alleged corruption and for increasingly authoritarian tactics toward journalists and opposition parties. But for a number of years all my American liberal friends who had any opinion at all on Turkey were pro-Erdoğan. They thought it had been unsustainable for Turkey to repress and deny its religion for so long—that the people had finally spoken out.

Many spoke warmly of the anthropologist Jenny White, an important scholar of modern Turkey whose book “Muslim Nationalism and the New Turks” characterizes the pro-Atatürk Kemalist culture as one of “militarism, hostility, suspicion, and authoritarianism” rooted in “blood-based Turkish ethnicity.” Muslim nationalism, by contrast, has sought to replace “historically embattled Republican borders” with “more flexible Ottoman imperial boundaries” and to “privilege Muslim identity and culture over race.” In the A.K.P.-sympathetic world view, the Ottomans, whom Kemalists had blamed for selling Turkey to the British, enjoyed a vogue as models of enlightened Muslim multiculturalism.

I could see that every slight to Kemalism was a knife in my parents’ hearts. For my part, I wasn’t sure what to think. Unlike them, I was educated in America. To me, as to most Americans, it seemed a tiny bit weird that nearly every public building in Turkey had a picture of Atatürk on the wall. I also knew that, in order for the Turkish Republic to succeed, millions of people had been obliged to change their language, their clothes, and their way of life, all at once, because Atatürk said so. I knew that people who had been perceived as threats to the state—religious leaders, Marxists, Kurds, Greeks, Armenians—were deported, exiled, imprisoned, tortured, or killed. I knew that, even at the start of the twenty-first century, there still weren’t enough checks on the military, and that women who wore head scarves were subject to discrimination, barred from certain jobs and universities.

Furthermore, when I thought about my own family, something about White’s critique of Kemalism felt familiar: the sense of embattlement and paranoia. Kemalism, not unlike Zionism, drew much of its energy from the fact that there could easily have been no Turkish state. At the end of the First World War, the victorious Allied powers assumed control over nearly all Anatolia; they divided some of it up into British and French mandates, and parcelled much of the rest out to the Greeks, the Armenians, and the Kurds. Before Atatürk was a lawmaker, he was a military commander, the leader of the Turkish War of Independence; and, from a military perspective, all those people and nations were anti-Turkish (as were the Arabs, who supported Britain in the First World War). My parents always dreamed of a post-nationalist world; as a small child, my mother prayed to Allah every night that the United Nations would be formed and there would be no more countries or wars. At the same time, I remember being warned as a child that there were anti-Turkish people in the world, people who held old grudges and could cause problems. For a while, Erdoğan really did seem to be trying to counter this kind of adversarial thinking—to open up business and diplomatic relations with Turkey’s neighbors, to lift the taboos on mentioning the “Kurdish issue” and the Armenian genocide. Under the A.K.P., a Kurdish-language channel débuted on Turkish national television; in 2009, Erdoğan went on the air and expressed good wishes in Kurdish. This would have been unthinkable a short time earlier.

In 2010, I moved to Istanbul, where I taught at a university and reported for this magazine for three years. I found that, much like America, Turkey was polarizing into two camps that were increasingly unable to communicate with each other. There was a new dichotomy I had never heard of before: the “white Turks” (Westernized secular élites in Istanbul and Ankara) versus the “black Turks” (the pious Muslim middle and lower-middle classes of Anatolia). The black Turks were the underdogs, while the white Turks were the racists who despised them. Jenny White writes, “The term ‘Black Turk’ is used by Kemalists to disparage Turks of lower-class or peasant heritage, who are considered to be uncivilized, patriarchal, not modern, and mired in Islam, even if they have moved into the middle class.” Erdoğan proudly declared that he was a black Turk.

The black and white breakdown was difficult for me to understand. My mother’s family—fair-skinned Ankara professionals who once had a chauffeur and a gardener—clearly fit the “white” profile. My father’s relatives in Adana were generally less educated and darker-complexioned. His father owned a store that sold textile dye to shepherds. There was a brief time when my father wore a mustache. Yet my father had written the essay in praise of Atatürk in his high-school yearbook, his sisters were pro-choice, none of the women in his family wore head scarves except to do housework, and I had never heard any of them express the remotest hint of nostalgia for the Ottoman past. I had heard relatives on both sides of my family worry that, if Atatürk’s reforms were undone, Turkey could end up “like Iran.” So who were my father’s family—also white Turks?

In Istanbul, I became careful about how I talked, careful not to sound—not tobe—Orientalist or Islamophobic. One evening, while I was hanging out at my apartment with a Turkish friend, our conversation was interrupted by the call to prayer, which was amplified by loudspeakers. In my apartment, as in most points in the city, you could hear the competing calls from several mosques going off at the same time, five times a day. Often, when I was walking around the city, I liked hearing the call to prayer. Some people were really good at it. (My mother had often told me that when her father was a boy he had such a beautiful voice and knew the prayer so well that he would fill in when the regular muezzin was sick.) Still, when I was at home with the windows closed, working or trying to have a conversation, the sound of amplified male voices extolling Islam always felt somehow invasive. “I know I sound like an asshole, but I really get mad sometimes,” I confessed to my friend. “Oh, no, are you an Islamophobe?” he said playfully. He advised me to think of the imam as “a singer, like Michael Jackson.”

Because I spoke Turkish imperfectly, smiled a lot, and often travelled alone, I got a lot of lectures from men, particularly taxi-drivers. Some were secularists; others, those with the most religious paraphernalia in their cars, didn’t try to make conversation. That still left many outgoing, casually Muslim drivers who took the time to explain to me how great the head scarf was—how it was “actually a beautiful thing.” For a woman to cover her head, they said, was in fact a feminist gesture, because it made clear she was demanding respect. There weren’t the same misunderstandings as with a woman whose head was uncovered.

I usually didn’t reply, especially if the driver seemed at all excitable, because when those drivers started to argue they would stop watching the road, and a lot of the cabs didn’t have seat belts. But once, when a driver pressed me particularly jovially for an opinion, I said something like “I think all women should be respected. It shouldn’t depend on their hair.”

The driver replied that I was absolutely right, that of course women should be respected, and that the head scarf was the best way for women to remind men of this necessity for respect. Men, after all, were worse than women: they could sometimes forget themselves, and then unfortunate things could happen, “even”—he said in a hushed voice, adding that he didn’t like to mention such things in front of me—“even rape.”

I replied, in my simplistic Turkish, that to me this sounded like a threat: either cover your head or rape can happen. The driver protested in ornate phrases that nobody was threatening anyone, that to speak of threats in this situation was unfitting, that he could tell from my smiling face that I was a good and trusting person, but that the world was an imperfect place, that some men were less like humans than like animals, and that it was best to send clear signals about what one was or wasn’t looking for. Then he left me at the fish restaurant where I was going to meet some literature professors.

If it had been just the two of us in the taxi in a political vacuum, I wouldn’t have begrudged the driver his opinions. It was his car and his country, and he was driving me where I wanted to go. I knew that my limited Turkish, which felt like such a handicap, was in his eyes a marker of privilege—a sign that I could afford to travel and live abroad. Often, the second question drivers asked, after the invariable “Where are you from?,” was “How much did the plane ticket cost?”

But the cab wasn’t in a vacuum; it was in a country where the head of state, whose wife wore a head scarf, repeatedly urged all women to have at least three children, preferably four or five. Erdoğan opposed abortion, birth control, and Cesarean section. He said that Islam had set out a clear position for women, but that you couldn’t explain it to feminists, because they “don’t accept the concept of motherhood.” The longer he stayed in office, the more outspoken he became. In 2014, he went so far as to describe birth control as “treason” designed “to dry up our bloodline.” No matter how hard I tried to be tolerant—no matter how sympathetic I felt toward Muslim feminists who didn’t want to be “liberated” from the veil, and who felt just as judged by the secularist establishment as secular women felt by the Muslim patriarchy—I could never forgive Erdoğan for saying those things about women. And, because he said them in the name of Islam, I couldn’t forgive Islam, either.

In the fall of 2011, I travelled to southeastern Anatolia to report on a newly discovered Neolithic site that archeologists thought might have been the world’s first temple. The site, Göbekli Tepe, was near the city of Urfa, a Muslim holy destination, believed to be the birthplace of Abraham. (The town, near the Syrian border, is now one of the points through which foreign fighters pass in order to join ISIS.) I seemed to be the only unaccompanied woman at my hotel. When I told the clerk I was staying for six days, he almost had a heart attack. “Six days?” he repeated. “All by yourself?” When I asked about the hours of the steam bath, he said it was for men only—not just at that time of day but all the time. I took the elevator up to my room, filled with the depressing knowledge that there would be no alcohol in the minibar. All the time I was in Urfa, whenever I saw any member of the hotel staff in the halls or the lobby, I always received the same greeting: “Oh, you’re still here?”

I had a hard time finding a taxi to take me to the archeological site. In the end, the hotel receptionist called a driver he knew: a surly guy with no meter, who charged an exorbitant fifty-five dollars round trip, and sighed and muttered under his breath the whole way. He didn’t answer his phone when I called him to pick me up, and I ended up having to hitchhike. Thinking that life might be easier if I had my own car, I made an appointment for six the next evening at a Europcar location supposedly on Urfa’s 749 Street. I got so lost that, by seven, I was still wandering up and down a mysterious stretch of road that seemed to start out as 771 Street and then to become, without any visible change, 764 Street. I had walked several times past the same convenience store, catching the attention of a bread-delivery man.