On the set of “Magnificent Century,” a soap opera that depicts intrigues at the court of Süleyman the Magnificent.Photograph by Ed Kashi / Vii / Corbis

On the way to the Sultan’s harem, I saw two beautiful slave girls walking across a parking lot clutching their tiaras and squinting unhappily into the sun. It was a hot August day in Istanbul, with an intermittent gusting wind. An attendant ushered me into a warren of royal chambers. I crossed the marble flagstones of a capacious Turkish bath, and proceeded down the passageway known as the Golden Road, through which a lucky concubine, having received the purple handkerchief indicative of the Sultan’s favor, approaches the privy chamber. On a gilt desk lay an imperial seal and two sticks of wax. An adjacent bedroom, lavishly appointed, had been occupied by the Sultan’s mother, until her death, toward the end of Season 2.

“Magnificent Century,” a soap opera set in the court of Sultan Süleyman the Magnificent, has been breaking Turkish television records since its première, in 2011. Every Wednesday, more than a third of prime-time viewers tune in to watch the latest ninety-minute episode. Süleyman, who reigned from 1520 to 1566, is known in Turkey as the Lawmaker, renowned for his innovative legal code, for the opulence of his court, and for expanding the Ottoman Empire from Transylvania to the Persian Gulf. It was Süleyman’s Army that defeated the Hungarian forces at the Battle of Mohács and launched the first Ottoman siege of Vienna, though the plot of “Magnificent Century” focusses more on the life of the harem, and the intrigues among Süleyman’s wife, concubines, mother, sisters, children, and viziers.

“Magnificent Century” is part of a Turkish trend called Ottomania, manifested in such diverse phenomena as Burger King’s Sultan meal combo (a 2006 TV spot featured a Janissary devouring a Whopper with hummus), a proliferation of Ottoman cookbooks, Ottoman-style bathroom consoles, wedding invitations with Ottoman calligraphy, and graduation gowns and flight-attendant uniform designs inspired by caftans and fezzes. In the past ten years, there have been increasingly elaborate commemorations of the Ottoman conquest of Constantinople, in 1453, along with the construction of new Ottoman-style mosques and the renovation of old Ottoman buildings, some of which have been repurposed as hotels or shopping malls. Last spring, protests were triggered by Prime Minister Recep Tayyip Erdoğan’s decision to raze Gezi Park, in central Istanbul, in order to build a shopping mall in the style of an Ottoman barracks. The Gezi protests subsequently escalated into the most widespread civil unrest in Turkey in more than a decade. Five protesters were killed and five thousand detained. Many remain in custody.

On the surface, “Magnificent Century” looks like a quintessential product of the Erdoğan years. Thanks to Erdoğan’s economic policies, Turkey has a thriving television industry, capable of staging elaborate period dramas, and a prosperous family-oriented middle class of observant Muslims eager to watch their own values reflected in a historical imperial setting. And, much as Erdoğan’s foreign policy has promoted relations with former Ottoman lands, the show has conquered large audiences in Balkan, Caucasian, and Arab countries not known for their fond memory of Ottoman rule. Broadcast to more than two hundred million viewers in fifty-two countries, “Magnificent Century” has accomplished one of Erdoğan’s main goals: making a powerful, non-secularist, globally involved version of Turkey seem both plausible and appealing.

And yet Erdoğan is not a fan. In late 2012, at the opening of a new provincial airport, he took a moment to condemn the show’s depiction of Süleyman, as well as its directors and broadcasters, hinting at severe judicial repercussions. Soon afterward, an M.P. from Erdoğan’s party declared that “Magnificent Century” would be discontinued. A bill to protect the Sultan’s memory was submitted to parliament. Turkish Airlines excluded “Magnificent Century” from its in-flight programming. Conservative viewers had already objected to the amount of time Süleyman spent in the harem; to a chalice from which he occasionally drank some unknown, potentially alcoholic beverage; and to the low-cut gowns of the harem women. When “Magnificent Century” first aired, Islamist demonstrators marched to the television-station offices and threw eggs at the building, while a man dressed as Süleyman read out an “imperial edict” denouncing the show.

Things have reached a certain benchmark when one man in a Süleyman suit is issuing edicts against another man in a Süleyman suit. This benchmark was passed in June, when the actor who plays Süleyman joined the anti-government protests in Gezi Park. Photographs in the papers showed him wearing a Bob Marley T-shirt, with a surgical mask to protect against tear gas. A week later, he was one of ten cultural figures and activists summoned to Ankara for a late-night meeting with Erdoğan. Participants later reported that, when the subject of disproportionate police force was broached, the Prime Minister turned to the actor and said, “As you must know, the Lawmaker Süleyman also had a harsh temper.”

The Ottoman Empire was founded in 1290, by a Turkoman tribal leader called Osman, and survived until the First World War. Encompassing, at one point, territories from Algiers and Athens to Zabid and Nové Zámky, it nonetheless lacked many of the features that we associate with empire. Until the nineteenth century, the economy was based on agriculture, not trade; new territories weren’t mined for raw materials or settled by colonists; and there was no imposed official language. Although the Ottomans saw themselves as Muslim conquerors, they generally granted religious freedom in exchange for higher taxes. The relatively peaceful coexistence of a diverse population under this system of taxed tolerance is sometimes described as the Pax Ottomana.

The decline of the Ottoman Empire, which began around the seventeenth century, has been variously ascribed to debt, decentralization, conflicts with Russia, and a run of subpar sultans. In the nineteenth century, a wave of nationalistic revolutions swept Europe and reached the Ottoman provinces in the Balkans. The Ottomans had no use for nationalism. During the First World War, which ushered in the end of multinational empires and the rise of nation-states, they sided with Germany and the Austro-Hungarian Empire. Some of their Arab territories, hoping for self-determination, joined the Allies, a “betrayal” that the Ottomans neither understood nor forgave. In 1920, the Treaty of Sèvres, even harsher in its terms than the Treaty of Versailles, dismantled the Ottoman Empire, handing control of its economy and military to the Allies. The Arabian Peninsula was granted independence, and Britain and France carved up the remaining Arab territories. Greece got Eastern Thrace and Izmir. Eastern Anatolia was divided between an independent Armenia and an autonomous Kurdistan, and the Dardanelles became an international waterway.

Just after these terms had been negotiated, a resistance army rose up against Greece and the Allies, and against the Ottoman holdovers who ran what remained of the state. Its leader was Mustafa Kemal, who had been a front-line commander in the Ottoman victory at the Battle of Gallipoli, and who later became known as Atatürk: Father of the Turks. The War of Independence ended with the expulsion of the Allies and the formation of the Turkish Republic, an outcome perceived in the Muslim world as an Islamic triumph over Western imperialism.

The way was open for Atatürk to fashion himself as a pan-Islamic leader, or a global anti-imperialist. Instead, he set about inventing a radically secular, radically nationalist “Turkish” identity. Though Europeans since the twelfth century had used the Latin name Turchia to designate the lands of the Turks, the Turks themselves had no such geographical or political concept. The first official state history, published in 1930 and used as a basis for school textbooks, characterized the Turks as an ancient Central Asian people with a long pre-Islamic history, including the Sumerian and Hittite civilizations. A scant fifty-two of its more than six hundred pages were devoted to the Ottomans, who were described not as the nation’s forebears but as a family of decadent profligates who had sold the Turks to Europe.

Between 1924 and 1926, Atatürk embarked on an aggressive program of secularization, abolishing the caliphate and the dervish orders, closing the shrines of Islamic saints, and banning the fez. The Islamic calendar and Sharia law were discarded, and the country adopted the Gregorian calendar and the Swiss Civil Code. Polygamy was outlawed, and women were allowed to show their hair in public, vote in elections, attend universities, and run for public office. The capital relocated from the Ottomans’ beloved Istanbul to Ankara, a provincial outpost in the middle of the Anatolian steppe. In 1928, the Arabic script was replaced by a modified Latin alphabet, and a state-appointed Language Committee set about purifying the Turkish language, ridding it of Arabic and Persian loanwords—a project roughly analogous to removing Latinate words from English. In 1935, the state published a handbook listing Turkic equivalents for Arabic and Persian vocabulary; everyday words were replaced by obscure variants recorded by folklorists in Anatolia, or borrowed from Tatar or Azeri. Not all these changes caught on, but Ottoman Turkish is a foreign language to modern Turks. Books written before the nineteen-forties have to be translated. Atatürk’s famous thirty-six-hour speech about the birth of the republic has been translated at least three times since it was first delivered, in the course of six days in 1927.

The directors of “Magnificent Century,” Yağmur and Durul Taylan, are sometimes described as the Turkish Coen brothers. They cc each other on e-mails, answer questions as “we,” and share a house in Malibu. Growing up in a secular, middle-class family, the brothers dreamed of working in film. Durul, the younger, stockier, and more restless of the two, began to publish film criticism in 1991, as soon as he graduated from university, with a degree in industrial engineering. He found himself increasingly drawn to the movie industry, and then to the freer territory of television, which was just starting to take off in Turkey. Meanwhile, Yağmur had graduated from medical school. The day his residency, in psychiatry, ended, he quit medicine and went into television production with his brother.

I met them in August at their Istanbul studio, in an industrial suburb not far from the airport. We sat outside, at a table near a loading dock. A caterer in a head scarf brought out three tulip-shaped glasses of tea, a fruit plate, and a pack of Parliaments. No sooner had anyone drunk half a glass of tea than she took all the glasses away and replaced them with full ones.

After the success of their first joint project, a Turkish adaptation of a Japanese game show, the brothers were asked to shoot a pilot for a series resembling “The X-Files.” They spent all the money they had made with the game show to go to France and buy their first 16-mm. camera. Everyone hated their adaptation of “The X-Files,” which was called “Secret File” and was cancelled after five episodes, in 1998. The brothers found themselves in serious debt. They recouped their losses somewhat with a sitcom called “Charlie,” which was “about a chimpanzee.” International success came in 2005, with “The Foreign Groom,” a comic series about a young baklava heiress from Gaziantep who falls in love with the son of a Greek shipping magnate. The show was an unexpected hit in Greece—a fact the brothers realized only when they went on vacation to a Greek island and their plane was swarmed by photographers.

The brothers had long wanted to do a historical drama, and they heard that the screenwriter Meral Okay had written a script about Süleyman’s court. (She died, of lung cancer, during Season 2.) Okay’s script centered less on the Sultan than on the charismatic former Christian slaves Roxelana and Ibrahim, whose lives had strangely parallel trajectories. (Because enslaving Muslims was frowned upon, almost all the slaves in the Ottoman court were born Christians.) In Turkey, Roxelana, whom Süleyman eventually married, is called Hürrem, which means “joyful.” Little is known about her early life—she first entered the historical record when she gave birth to a son—but she is believed to have been Alexandra Lisowska, the daughter of a priest in Ruthenia (in present-day Ukraine), and to have been captured by Tatars. Ibrahim, known as Ibrahim of Parga, after his native town, on the northwestern coast of Greece, was a Slavic-speaking Venetian subject. The son of a poor seaman, he was probably kidnapped as a child by Turkish corsairs. Musically gifted, fluent in Persian, Greek, and Italian, he entered Süleyman’s service around 1514, when both men were about twenty. After becoming sultan, Süleyman promoted Ibrahim directly from his personal service to the highest political office in the Ottoman state: Grand Vizier. The two took their meals together, and it was said that they slept with their heads touching.

Roxelana entered Süleyman’s household six years after Ibrahim, and soon displaced the Sultan’s previous favorite concubine, who was the mother of his firstborn son, Mustafa. From 1521 to 1530, Roxelana bore him five sons and a daughter. Before her, no concubine was known to have borne more than one son. She also broke with custom by staying in Topkapi Palace after her sons were grown—normally, when a son came of age his mother accompanied him to a provincial governorship—and by marrying Süleyman. The idea of a married sultan was so outrageous at the time that Roxelana was reviled as a witch.

One morning in 1536, Ibrahim was found strangled in his bed. The exact reasons for his killing are unknown, but tensions with Roxelana were certainly involved. Her influence also played a role in the fate of Mustafa, who was strangled on his father’s orders in 1553. His death left three of Roxelana’s sons—Selim, Bayezid, and Cihangir—as the only contenders for the throne. (Roxelana’s two other sons had died of natural causes.) Cihangir, a hunchback, perished soon after Mustafa. The bitter rivalry between Bayezid and Selim dragged on for years, culminating in a civil war. Süleyman eventually sided with Selim, forcing Bayezid to flee to Persia, where he and his sons were tracked down and killed. History did not bear out the wisdom of Süleyman’s choice: only eight years into his rule, Selim, known as Selim the Drunkard, slipped in the bath and suffered fatal head injuries.

The Taylan brothers said that it was important for them that the script was written by a woman, and that it depicted the apex of Ottoman glory mostly from the perspective of slave women. They were unprepared for the furor that the show aroused. For a time after Erdoğan’s attack, “Magnificent Century” was the top item of national news. “Imagine—you create something, you gain the largest global following in Turkish television history,” Yağmur said. “Nearly two hundred million people are watching your show. But in your own country you’re living almost in fear of being put in prison.”

In the end, nobody was put in prison. The show wasn’t even taken off the air. When I asked about the effects of Erdoğan’s critique, Yağmur talked about self-censorship. “There used to be censorship,” he said. “Now there’s a climate.” Until the nineteen-nineties, Turkey had an official censorship board. Today, Yağmur explained, censorship is carried out indirectly, by an organization called the Radio and Television Supreme Council: “It doesn’t prevent you from doing stuff—but it punishes you later.” He said that in 2011 the council handed their station a record-setting, six-figure fine, citing a scene that shows slave girls undergoing virginity checks. The station refused to pay, but the fine was upheld by the Council of State, Turkey’s highest administrative court, on the ground that virginity checks didn’t accord with Turkish family values, and that their portrayal was a “distortion of historical truths.” The show’s staff historian cited a seventeenth-century European painting showing a girl being inspected at a slave market. The council had its own historical experts, who objected that the show portrayed only the lascivious aspects of the harem, reinforcing Orientalist fantasies; in fact, “the harem was a serious educational institution whose secret has not yet been unravelled.”

Subsequent episodes featured more battles alongside the trysts. “We were destroyed, both mentally and physically,” Yağmur said of their experience filming battles. It was expensive and time-consuming. The Turkish television industry, he said, lacked “the right infrastructure” for working with horses. The Battle of Mohács had been filmed under particularly difficult circumstances, near a kilometre-wide river crossing in Eastern Thrace—a stand-in for the even wider river that Süleyman’s Army crossed in Hungary. “It took four days,” Durul said. “Just think of all of those people—just think of everything they have to eat! All that has to be carried by someone!” After a certain point, I couldn’t tell whether he was talking about the historic event or its reënactment: staging a battle was apparently as much work as fighting a real one.

The actual harem of Topkapi Palace is a museum now, though not all the rooms are open. When I visited, I found it a melancholy place, despite its beauty and elegance. Sunlight filtered through grated, faceted, colored, recessed, or otherwise obstructed windows. Sovereigns with limitless power had lived here, people who could decorate any way they wanted, and they had chosen to cover every interior surface with ceramic tiles. Cordons blocked off certain avenues and led you down others. The harem has more than four hundred rooms, and the floor plan reads like a Borges dictionary: Mosque of the Black Eunuchs, Apartment of the Black Eunuch Treasurer, Apartment of the Black Eunuchs Who Waited on the Sultan in the Harem, Elephant House, Place of the Forty Columns, Consultation Place of the Jinns. I soon lost my bearings and, having passed along an outdoor corridor between two buildings, protected from the sky by broad wooden eaves, was startled to come out into a courtyard reserved, according to a placard, for the sultans’ favorites, and to see the Bosporus gleaming far below. On the opposite shore, gray skyscrapers shimmered in the haze.

Far less is known about the sixteenth-century harem than about the royal houses of Europe during the same period. There were no nobles hanging around the Ottoman court, writing memoirs or exchanging gossipy letters. There was no tradition of royal portraiture. The only representation of Süleyman by anyone who had seen him was painted in the Sultan’s old age by an Ottoman naval captain. There are portraits by Titian and Dürer, but, like most Ottomanists today, they were working from the descriptions of European visitors—primarily Venetian and Habsburg diplomats. The Europeans’ standards of newsworthiness are the ones we inherited. Reading the ambassadors’ memoirs and letters, I realized that I had seen nearly every interesting anecdote or observation in “Magnificent Century”—from Ibrahim’s controversial display of some classical statues that had been seized from Budapest to the dialogue about salvation between a Habsburg ambassador and a Muslim vizier whose father had been a Christian pig farmer.

I made another trip to Topkapi Palace with the N.Y.U. historian Leslie Peirce, who was doing research for a biography of Roxelana. Peirce, the descendant of Quakers who came to America with William Penn, first visited Turkey with the Peace Corps, in the sixties, and is now one of the world’s foremost experts on the Ottoman harem. Her first book, “The Imperial Harem” (1993), was a groundbreaking study of the “sultanate of women”—a period beginning during Süleyman’s reign, when Roxelana and her household moved into Topkapi, giving women unprecedented access to political power.

The word “harem” comes from the Arabic root “h-r-m,” which can mean both an inviolable, sacred place and something taboo. The holy cities of Mecca and Medina and the Temple Mount, in Jerusalem, are all known as harem-i şerif (“noble sanctuary”). The Topkapi harem, the innermost circle of palace life, was home not only to concubines but to the sultan’s children, his mother, and his sisters, and to a vast hierarchical staff of women and eunuchs.

Peirce’s book explains that, although the first Ottoman sultans married women from ruling houses in the Balkans and Anatolia, they generally preferred to father heirs with slave concubines, who brought with them no troublesome in-laws. By the middle of the fifteenth century, sultans stopped reproducing with noble brides, and then stopped marrying altogether. Each concubine was allowed to bear only one son, and it was then her job to bring him up. The logic seems to be that each prince needed a mother of his own in his corner: for a century and a half, whichever prince became sultan would kill all the other princes.

Perhaps the most distinctive feature of the Ottoman state was the irrelevance of hereditary aristocracy. As one Habsburg ambassador noted, “Those who hold the highest posts under the Sultan are very often the sons of shepherds and herdsmen.” Most of the Ottoman military and bureaucratic élite was made up of Christians brought from the Balkans as young boys, and trained and educated in the palace. Slaves had a lot to recommend them over nobles. They had nobody to be loyal to apart from the sultan. Having no connections, they didn’t need to be rewarded unless they really did a good job. You could run a genuine meritocracy with slaves.

The radical departure from a traditional family structure makes for strange, compelling television. Which of the Sultan’s four sons will inherit the throne, and which three will be killed, and in what order? Which woman will become the Sultan’s favorite, and which will succeed in poisoning or strangling her rivals? Contemporaries saw Roxelana as an unscrupulous opportunist, who cared only about promoting her own children and keeping her hooks in Süleyman. Some people still blame her for the fall of the Ottoman Empire, holding her responsible for Mustafa’s murder and the succession of her incompetent son, Selim the Drunkard. But, to the television audience, Roxelana is a model of family values, going to any lengths to secure a monogamous relationship and a prosperous nuclear family, championing her sons despite their disabilities and limitations.

The show’s creators made canny use of the fact that Süleyman was an accomplished goldsmith. We frequently see him making rings and necklaces for the harem women. Viewers are thus afforded the spectacle of beautiful women fighting over beautiful jewelry, and beautiful women being awarded beautiful jewelry by a powerful man. One particularly contentious article is a ring that Süleyman gives Roxelana—after promising it to his previous favorite. Her fury upon seeing Roxelana wearing her ring has a visceral power that until then I had associated only with reality television. The ring, which features a teardrop-shaped emerald surrounded by diamonds, becomes the subject of endless intrigues. By November, 2011, Turkish sales of “Hürrem’s ring” had exceeded a million. High-quality versions cost tens of thousands of dollars, and are said to be popular in the Gulf States. Cheap knockoffs can be found in any Turkish shopping mall.

Peirce, a devotee of “Magnificent Century,” says that the show has influenced her biography of Roxelana, drawing her attention to the central role of children, who are often neglected in the historical record. “There are things you understand once you see them acted out in front of you,” she said, adding that she had been moved by the depiction of the events leading up to the birth of Roxelana’s firstborn. After the death of his father, Süleyman’s first successful military campaign was followed, in the space of a month, by the loss of two sons and a daughter. That’s when Roxelana gave birth to a baby boy. Peirce said that the show had helped her to grasp emotionally the impact this would have on a man who had just lost three children: “She produced this son, when he’d lost everything else.”

Though some scenes in the first season of “Magnificent Century” were filmed on location at Topkapi Palace, the Ministry of Culture and Tourism subsequently revoked permission to shoot there, and the show is now produced almost entirely on a soundstage. The day I visited, the brothers were filming Episode 104: the first installment of the fourth, and final, season. Durul hurried me through the mazelike set.

“Careful,” he mouthed soundlessly: shooting had started somewhere. In the private quarters of the actual palace, too, dead silence had reigned. The pages were trained in a special sign language. All this greatly impressed the European ambassadors: a Venetian once saw a vizier summoned to his own execution, in sign language, by a mute.

Durul introduced me to Selim Bayraktar, who plays the harem’s chief eunuch. He was already wearing his black brocade caftan and single hoop earring familiar from the show, but his head looked strangely small: he hadn’t yet put on the turban he wears on TV. We sat on sofas in the changing room, and he told us the story of his life. A Kirkuk Turkoman, born in Iraq, he began his performance career in gymnastics competitions as a child. Once, before the Iraqi borders closed in the eighties, he travelled to Bulgaria and saw a circus. For years, he exchanged letters with the circus owner’s son. When Bayraktar was thirteen, in the final days of the Iran-Iraq War, one of Saddam Hussein’s body doubles visited his school, to recruit boys into the Army—the male teachers had already gone to the front. When Bayraktar was picked, his family hired Kurdish paramilitaries to smuggle them into Turkey. In his mid-twenties, after becoming an actor, Bayraktar went to see a travelling circus. To his astonishment, it was the same troupe he had seen as a child. His old friend remembered him. That was how Bayraktar ended up joining the travelling circus. “I rode on a bicycle with one wheel—a unicycle,” he recalled. “And I juggled at the same time.”

Bayraktar speaks not only Kurdish and Arabic but also Ottoman Turkish, which he studied with his grandfather, a scholar of Islamic law. On the set of “Magnificent Century,” he helps out with calligraphy, and also with curses. He describes his character, Sümbül Ağa, as a survivor: he survived having his balls cut off, and the wound cauterized with boiling oil.

Bayraktar had done a lot of research into castration. “Do you wonder why Sümbül walks strangely?” he said, demonstrating his mincing, penguinlike walk. “It’s because of the boiling oil. Of course, this is my interpretation—it isn’t a fact. Maybe, if your arm was cut off here”—he indicated a point below the elbow—“and cauterized with boiling oil, maybe you would still be able to bend your arm normally. But I don’t think you would.” He thought the real Sümbül Ağa was probably castrated at the age of nine or ten, so his body would already have started producing testosterone. That’s why Sümbül doesn’t speak in a high voice. Even after the surgery, Bayraktar explained, the adrenal glands would produce testosterone. Eunuchs could have erections, and were rumored to have love affairs with women in the harem.

A few minutes later, I watched Durul direct Bayraktar in a scene from Season 4, in which Sümbül creeps up behind Roxelana in a secret passageway. Twenty-five years have elapsed since the beginning of Season 1, and Roxelana is played by an actress new to the series. She had originally been played by Meryem Uzerli, a previously unknown German actress with a Turkish father. Uzerli became a star overnight, beloved for her cherubic face, flame-red hair, broken Turkish, and unwaiflike physique. “Her German accent grew on us,” one journalist wrote. “We fell in love with her red hair, her strange walk, her screams of ‘Giff me my children.’ ” Germany today is home to some three million varyingly beleaguered Turks, most of them descended from the “guest workers” who emigrated in the sixties, and this historical circumstance lends Uzerli’s story an appealing element of reversal: many Turks have gone to Germany to work on assembly lines, but sometimes a Turkish-German “returns” to Turkey and becomes a queen.

Toward the end of Season 3, Uzerli suffered a breakdown and went back to Germany—pregnant and abandoned, it turned out, by an Istanbul playboy. In an interview last August, she talked about her refusal to get an abortion. I found myself remembering the scene in “Magnificent Century” in which Roxelana, transfigured by rapture and triumph, learns of her first pregnancy. When Uzerli described her life in Istanbul—living alone in a hotel, adrift in an unfamiliar society, working gruelling hours on set, staying up all night to memorize lines in a foreign language—it sounded nearly as challenging as Roxelana’s life in the harem. When she got back to Berlin, she dyed her hair, in order not to see Roxelana in the mirror. Her baby is due any day now.

The new Roxelana is a veteran theatre and TV actress seventeen years older than her predecessor. This makes sense, given the story’s time line, and yet most of the other returning characters are played by the same actors, cosmetically aged, with various degrees of success. The over-all effect is strange, as if time had operated differently on different people.

I sat with Durul in front of a video monitor, in the main hall of the harem. The actors, standing in a passageway to the left, weren’t visible from where we were sitting, and could be seen only on the monitor. The new, middle-aged Roxelana came into view. Standing very erect, with a pale face and a dour mouth, she sneezed, carefully blew her nose, and stared into space.

“Ready, camera, action,” Durul said. Roxelana walked slowly along the passageway. There was something terribly sad about her. The young Roxelana wanted so much, so passionately. Now she was like a zombie of her old self, doing the same things, but without the passionate reasons. Bayraktar came up behind her, utterly transformed into a man who could still remember having his castration wounds cauterized with boiling oil. Light from a brass lamp flickered over his suspicious, obsequious features. Glancing to the left, I could now see the actors’ trembling shadows, getting bigger as they proceeded toward us along the passageway; but I had to look at the monitor to see their intense expressions and detailed clothing. It was like Plato’s allegory of the cave: television, like philosophy, liberates us from un-seeing.

Günhan Börekçi, an Ottoman historian who is one of the consultants for “Magnificent Century,” told me that the greatest challenge to historical accuracy was posed by the restrictions upon the characters’ having contact with one another. Often, the story line requires a meeting between two characters who could never have occupied the same room or looked each other in the face. The courtship of Ibrahim and the Sultan’s sister Hatice posed a particularly difficult formal problem, solved, in the end, by means of private terraces: standing on her terrace, Hatice could hear Ibrahim playing the violin, and he could glimpse her through a lattice.

Börekçi reads every script, vets the palace décor, and helps the actors with their characters. The actors ask him things he has never thought to investigate. What sherbet would Roxelana drink when she had a headache? What would be an appropriate birthday gift for an eight-year-old Ottoman prince? How, exactly, were prophecies made using sand? Could the court architect have been left-handed?

Börekçi’s life has changed since “Magnificent Century.” Being an Ottoman historian had become like being a doctor: everyone you met had a question. A butcher wanted to know if the sultans drank alcohol, or condoned homosexuality. A taxi-driver remarked, as he drove Börekçi past the ancient walls of Constantinople, “The Byzantines were bad people, right?” A doctor asked whether the empire would still have failed if Süleyman hadn’t killed Mustafa, and kept interrupting Börekçi to tell him his own theory. His theory was that the empire would still have failed.

“They aren’t looking for historical knowledge,” Börekçi said. “They’re looking for confirmation of their beliefs.” The butcher wanted to believe that the Ottomans were observant Muslims, the taxi-driver that the Byzantines had deserved to lose their favorite city. The doctor wanted to believe in the historical necessity of the Turkish Republic. They were looking for answers, not about history but about who they were.

When I asked the brothers how Ottoman history was taught when they were children, Yağmur replied, “In a schizophrenic fashion.” On the one hand, they had learned to take pride in their glorious history. On the other hand, he said, “there are fathers murdering their sons, and foreign, non-Turkish women infiltrating the state.” This tension is illustrated with particular starkness in the life of Süleyman. “Süleyman epitomized justice, he valued justice over all things, and his rule was the Ottoman Golden Age,” Yağmur said. “But he killed his best friend, and he killed his own son.”

The debate over “Magnificent Century” touches on one of the key issues in Turkish politics: the question of national identity. Who were the Ottomans—enlightened cosmopolitans or decadent sociopaths? Who was Süleyman? Who are the Turks? For the first eighty years of the republic, national identity was defined largely by the figure of Kemal Atatürk, with his tailored suits, his commitment to scientific positivism and ballroom dancing, his devotion to an adopted daughter who became Turkey’s first female fighter pilot, and his emphatic rejection of all things Ottoman. Atatürk’s picture is on every denomination of Turkish currency, and hangs on the wall of every public building. It is a crime to insult his memory.

And yet Kemalism, like all nationalistic ideologies, left some people out. In the first decades of the twentieth century, population exchanges, forced deportations, and massacres led to a drastic reduction of Turkey’s Greek and Armenian population. With the Turkification of Anatolia, Kurdish and other non-Turkish languages were barred from schools. The Kemalist ideal of Westernization has been criticized as élitist, Orientalist, even racist. Since sweeping to power, in 2002, Erdoğan’s Justice and Development Party, or A.K.P., has gained wide support with its attempt to revert from Kemalism to an Ottoman identity that it presents as more inclusive.

The Ottoman revival has its roots in the Cold War, when the main political polarity in Turkey wasn’t Islamist versus secularist but pro-Communist versus anti-Communist. In Turkey, a NATO member and a U.S. ally, widespread internal violence between leftist and rightist groups culminated in a military coup, in 1980. The new government addressed the threat of leftism by opening the Turkish market to global competition, and by promoting Islam as an ideological alternative to Communism. One result of these measures was the rise of a new class of observant Muslim businessmen—entrepreneurs who described themselves as “Islamic Calvinists,” characterized Muhammad as a merchant, and cited the Koran as an authority on limiting economic intervention by the government. Where Kemalism had its basis in economic isolationism and cultural Westernization, these businessmen wanted just the opposite: Western-style capitalism and a Turkish culture. In the Ottomans, they found the ready-made idea of a prosperous Muslim élite, trading on an equal footing with Europe but preferring halvah to profiteroles.

The politicization of Ottoman history continued throughout the nineties. The A.K.P.’s ideological precursor, the Islamist Welfare Party, began annual commemorations of the conquest of Constantinople, an event it described as “the beginning point of the supremacy of Muslims over Europe.” Kemalism told Turks that they didn’t have to feel humiliated about the Treaty of Sèvres, because it was the Ottomans’ fault; neo-Ottomanism tells Turks that they don’t have to feel humiliated about the Ottomans, because if you go back far enough the Ottomans were the ones doing the humiliating. Three years ago, Erdoğan presented Nicolas Sarkozy, a vigorous opponent of Turkey’s bid to join the European Union, with a 1526 letter in which Süleyman agreed to help King Francis I, who had been imprisoned by Charles V, the Holy Roman Emperor. “I am Sultan Süleyman, Sultan of Sultans, Ruler of Rulers, earthly shadow of Him who crowns sovereigns,” the letter begins, “Ruler of the Mediterranean Sea, Black Sea, Rumelia, Anatolia, Karaman, Greece, Dulkadir, Diyarbakir, Kurdistan, Azerbaijan, Damascus, Aleppo, Egypt, Mecca, Medina, Jerusalem, all the Arab realms, Yemen, and many other lands. You are Francis, King of France.” (“He seems not to have read it,” Erdoğan later observed, of Sarkozy.)

What if Turkey could be not Europe’s imitator but Europe’s peer? What if you discarded not six centuries of Ottoman rule but the eighty years of the Turkish Republic? Erdoğan’s foreign minister has characterized the twentieth century as “only a parenthesis,” and has called upon Turks to recover their “ancient values,” to “again tie Sarajevo to Damascus, Benghazi to Erzurum and to Batumi.” Critics might object that Sarajevo is unlikely to be delighted by the prospect of a tie to Assad’s Damascus. And Erdoğan’s frequent invocations of the Bosnian capital and other sites of anti-Muslim violence seem calculated to foster grudges rather than to heal them. Nonetheless, neo-Ottomanism increased support for Erdoğan, not only in Turkey but also, for a time, in the Western press, which had long awaited an attractive model of a “Muslim democracy.” Erdoğan drew widespread approval for participating in Arab League summits, contributing to U.N. forces in Lebanon and NATO forces in Afghanistan, and improving Turkey’s relations with Iraqi Kurdistan. Trade with Iran, Iraq, Syria, and Russia skyrocketed, as did tourism from the Gulf States.

When Erdoğan denounced “Magnificent Century,” it was in the name of his new foreign policy. He had been using the Ottoman precedent to justify Turkey’s involvement in Gaza, Syria, Lebanon, Kosovo, Iraq, Azerbaijan, Afghanistan, Myanmar, and Somalia: “Wherever our forefathers went on horseback, we go, too.” He described “Magnificent Century” as a defective picture of where these forefathers spent their time. “We never knew forefathers like that,” he declared. “We never knew a Lawmaker like that. He spent thirty years on horseback.” In other words, the Süleyman on television wasn’t the real Süleyman. Süleyman was to be found on a horse, not in a harem. At the late-night meeting during the Gezi protests, Erdoğan is said to have quizzed the actor who plays Süleyman on the meaning of certain Ottoman words. The actor, being an actor rather than a real sultan, didn’t know. “You play the Lawmaker—how can you not know these words?” Erdoğan demanded.

Sometimes the Taylan brothers wonder what Süleyman would think if he could see “Magnificent Century.” “We know he cared a lot about external appearances,” Durul said hesitantly, “so he would have liked certain aspects.” He trailed off, perhaps contemplating how Süleyman might feel about watching the more trying moments of his reign reënacted on a demonic talking box.

“After Süleyman killed Mustafa, some poets in the court criticized him,” Yağmur continued. “He didn’t send them away. These were poets who practically called him a murderer, and they were allowed to stick around, for years. In a sense, he was an enlightened person.”

When the Gezi protests broke out, I was nearing the end of a three-year stay in Turkey, where my parents grew up. I had been teaching and writing, and was living in Cihangir, a gentrified neighborhood near Taksim Square, named after Roxelana’s unhappy hunchbacked son. My seventh-floor apartment was regularly flooded with tear gas, and with friends and colleagues who had come to the protests and got stranded when police barricaded the streets. One night, on the roof of my building, an Iraqi war correspondent who used Istanbul as a base to report on Syria told me he had never seen “insurgents” more determined than the Turks. “Your people are crazy,” he said. I felt a tiny bit proud. A Bulgarian friend had travelled by bus from Sofia and set up camp in my spare room, reporting on the protests, loudly, by telephone, at seven in the morning, for Bulgarian National Radio. Nearly every day, one or the other of my parents called from the U.S., urging me to come home early: had they gone through the trouble of leaving their homeland and bringing up an American daughter just for her to get hit in the head by a tear-gas cannister?

But I didn’t want to leave. The protests felt like the culmination of everything I had seen in the previous three years. Members of a leftist soccer-fanatic group I had written about were placed in police detention after commandeering a bulldozer in the vicinity of the Prime Minister’s office. An environmentalist I had shadowed near the Armenian border called me from an underground parking garage in a luxury hotel, where he had got stuck during a police raid after attending a dinner with Al Gore. At a barricade north of Taksim, I ran into a left-leaning chef I had profiled. It was like the end of a novel. When I packed up my apartment, at the end of the summer, I found five hard hats, three pairs of goggles, and two gas masks.

The protesters included nearly every group opposed to Erdoğan: Kemalists, labor unionists, Marxists, feminists, L.G.B.T. activists, environmentalists, anti-capitalist Muslims. Even a Kurdish-rights party had a tent in Gezi Park, which for a brief time became a utopia, with free meals, free cigarettes, free medical care, a library, concerts, and a performance artist doing a whirling-dervish dance while wearing a gas mask. Nightly police raids only intensified the festival mood.

Erdoğan’s response to the protesters was similar to his response to the Süleyman of “Magnificent Century.” The people protesting, he said, weren’t the actual Turkish people but merely “marginal groups” and foreign saboteurs, whose impact was exaggerated by the Western press. At a rally on June 16th, in front of hundreds of thousands of his supporters, Erdoğan accused the BBC, CNN, and Reuters of covering up the truth about Turkey. “This people isn’t the people you showed the world,” he declared. “Turkey doesn’t consist only of Taksim Square.”

One evening, my Bulgarian friend mentioned the mania for “Magnificent Century” in Sofia, where it has transcended an entrenched animosity toward the Ottomans. A nationalist had recently asked my friend’s mother to sign a petition to ban Turkish news programming from Bulgarian TV. My friend’s mother joked that she would sign, but only if “Magnificent Century” were also banned. “But that’s completely different!” the nationalist exclaimed. She was a devoted fan.

It’s significant that a Bulgarian nationalist can watch “Magnificent Century” without feeling her nationalism compromised, while Erdoğan can’t. “Magnificent Century” is set in a world where nationalism hasn’t won yet. It works in precise opposition to the A.K.P.’s neo-Ottomanist program. In no meaningful sense is Ibrahim of Parga actually from Parga. On entering Süleyman’s household, he leaves the domain of nationhood for that of the purely human—a world where the family drama expands and fills up the space of the political.

On the way back to the U.S. at the end of the summer, I stopped by a small-scale replica of the Grand Bazaar in the Istanbul airport, and asked the salesman at the jewelry counter if he carried Hürrem’s ring.

“Of course,” he said, unlocking a case and pulling out several specimens.

“My mother and I are big fans of ‘Magnificent Century,’ ” I said, trying one on.

“We’re all big fans. Although, honestly, the zest is gone now that Roxelana has left.” Contemplating the departure of the young Roxelana seemed to make him angry. “What a stupid woman,” he said, after a moment. “Who was she in Germany? Who appreciated her there? She came to Turkey and became a star. And then, instead of buying a house, she went back to Germany to live in a tiny apartment.” Of course, he was talking about the actress, not the real Roxelana. Yet there were similarities. Who had Roxelana been, back in Ruthenia? Who appreciated her there? I found myself wondering whether, given the choice, she would have left the palace, and everything it meant, to live in a tiny house in the place where she came from. Would she have gone back, if she could have? I bought two identical rings: one for my mother, and one that I wore on the plane home. ♦