Last month, I spent several days at the Forbidden City, the gargantuan palace in the middle of Beijing where China’s emperors ruled the land for nearly five hundred years. I was there to attend a conference on religion and power in imperial China, but my thoughts were drawn to more contemporary concerns: the plight of the Uighurs in China’s far western province of Xinjiang, including re-education camps aimed at breaking their faith in Islam.

I was struck by parallels between contemporary and imperial religious policy at the end of the conference, when our hosts took us to parts of the complex that are off-limits to tourists, such as the Hall of Imperial Peace. This was a Daoist temple built in the early 1400s to honor the Perfected Warrior, zhenwu, whom the first emperor of the Ming dynasty credited with helping drive the Mongols out of China. When another nomadic people, the Manchus, defeated the Ming in 1644, they razed many Ming structures but kept the hall and even worshipped there every Lunar New Year’s. What better way to lessen Chinese displeasure at being ruled by foreigners than to worship at their shrines?

This was true of other religions, especially Buddhism, which the Manchu emperors patronized enthusiastically. And, of course, they also had their own shamanic rituals performed in the Forbidden City. Indeed, while we often describe the Forbidden City as a palace, it actually holds more than sixty-five temples to all of the empire’s great religions.

All, except Islam. The Qing Dynasty was a multi-ethnic empire, like today’s China, but the underlying assumption was that the state should determine orthodoxy and heterodoxy. For those who assimilated, the state was generous. But for those whose beliefs didn’t fit the mold, magnanimity turned to suppression.

Abrahamic faiths posed a special challenge to the Chinese religious view. Judaism, Christianity, and Islam claim an exclusive path to salvation: there is only one god, our god, and if you don’t follow him you will go to hell. That’s a rather stripped-down version of these rich and complex faiths, but this monolithic view of truth lies at the heart of these belief systems—and presented a problem to Chinese syncretism.

We can see the problem most clearly with Christianity in China. It obtained a permanent foothold when Matteo Ricci and other Jesuits arrived in Beijing, starting around 1600, but lasted only a century. What undid their efforts was the Catholic Church’s insistence that Chinese ancestor worship was incompatible with monotheism. When the pope sent the emperor a letter demanding that Chinese give up their funerary practices, including ancestor worship, the emperor somewhat understandably banned Christianity as a delusional, troublemaking sect. It was legalized again only in the mid-nineteenth century, when Western gunboats forced China to allow missionaries back in.

Islam faced similar problems. In contrast to Christianity, it has had a much longer presence in China—thirteen hundred years—and was far more deeply embedded in China, with big metropolises like Beijing and Xi’an boasting magnificent, ancient mosques, and thousands of predominantly Muslim villages dotting the country. (While China also has many grand churches, most are relatively recent and built by foreign missionaries—not the result of a millennium of history.)

Despite this long history, Chinese rulers have had a hard time figuring out how to accommodate Islam. Initially, it was of little concern to China’s rulers. The religion arrived in China in the seventh century during the Tang dynasty, an era of openness and cosmopolitanism, and stayed on during the next dynasty, the Song (from the tenth to thirteenth centuries), with Muslims serving as the empire’s middlemen for trade.

By the next dynasty, however, problems began to arise. Founded by Genghis Khan’s Mongolian armies, the Yuan used Muslims as their tax collectors. Many gained great wealth—and attracted much resentment among the empire’s Chinese subjects. To appease them, the Yuan court began now-familiar policies to weaken Muslim power. Kublai Khan, the Yuan’s greatest emperor, banned halal food, circumcision, and cousin marriages (a common cultural practice among Muslims of that time). As a result, many prominent Muslim families left China.

The next dynasty, the Ming, was largely closed off to the outside world so China had no need for Muslim traders. It also didn’t control the heavily Muslim areas of Gansu or Ningxia, let along today’s Xinjiang, which had been part of the Mongols’ empire. There were still Muslims living in the Chinese heartland, but they were of little concern to the court.

That changed radically when the Qing took over in 1644. The Qing harnessed their martial skills—horsemanship and archery, but also more modern weapons like guns—with the economic might of hundreds of millions of Chinese. This created an unbeatable war machine that smashed the nomadic peoples to the north, who for millennia had threatened China, and expanded the empire’s western borders, taking Tibet and expanding into Central Asia. Suddenly, a China-based empire controlled vast Muslim territories. (Chinese school children learn that the Qing were merely reasserting China’s traditional control over the string of oases that made up the Silk Road, but this is a fanciful, nationalistic reading of history. While it’s possible to find periods of Chinese history when dynasties like the Han and Tang had trading and diplomatic ties with the far west—and occasionally sent out military expeditions, and even temporarily controlled this area—the reality is that the Qing were more like a Western gunpowder empire, using superior technology and the tentacles of a bureaucratic state to colonize new lands.)

The very name of this area, Xinjiang, explains the situation. Literally, it means “new territories,” which Chinese nationalists would say was merely the Qing’s view of things, and that, again, it had always been an integral part of Chinese territory. But even if one concedes that at some point much earlier (say, at the height of the Tang in the eighth century), it had been under Chinese control, a millennium later the people living there did not feel Chinese, look Chinese, speak Chinese, share Chinese values and myths and stories, or, by and large, want be part of China. Thus began a series of rebellions, which continue to this day.

*

Superficially, the Qing empire was multicultural and inclusive: many Qing monuments, for example, display four languages: Chinese, Manchurian, Mongolian, and Tibetan. But the idea was that each of these groups had their own discrete geographic area: the Manchurians in their ancestral homelands in China’s northeast near Korea; the Mongolians to the north; the Tibetans on the great western plateau; and the Chinese to the south and east of these peoples.

Islam could, perhaps, be incorporated into this worldview because Muslims predominated in far western provinces, such as Gansu, Ningxia, and Xinjiang. The problem was that their long presence in China meant that many also lived scattered throughout the empire’s cities and towns. This made it hard for the Qing to craft a policy. They decreed that Muslims could be valuable subjects, but also imposed exclusionary policies on all Muslims, and never integrated them into the national religious system—hence, no mosque in the Forbidden City.

To counter what they saw as Islam’s threat of rebellion in Xinjiang, the Qing turned to their favorite religion, Tibetan Buddhism. Tibetan Buddhism was widely practiced among not only Tibetans but Mongolians, too, so it usefully bound two very significant ethnic groups. The Manchus, who originally had been animists, had also quickly adopted it. Although it wasn’t the same kind of Buddhism that was practiced by ethnic Chinese, it was at least an offshoot of the same religion so not incompatible with Chinese beliefs.

So when Muslims began to resist Qing rule, the court drew upon a powerful Tibetan Buddhism story to fight Islam. This was the story of Shambhala, the mystical kingdom hidden in the far reaches of the Himalayas. (For Westerners, this has somewhat romantic associations, and in the twentieth century helped create the myth of Shangri-La.) But the original story is actually a bloody end-times revenge fantasy. In the tenth or eleventh centuries in northern India, Buddhism was in decline and Muslim invaders were blamed. The legend of Shambhala was that it was the final mountain retreat of Buddhists after their lands are overwhelmed by Muslims. On judgment day, the Shambhala’s gates open, and a vast Buddhist army rides out to slay the Muslims.

Although this violence is often glossed as an allegory for the vanquishing of greed and lust in the world (and indeed many accounts leave out the anti-Muslim angle), the Qing used it to justify a kind of reverse jihad. Qing rulers built shrines to commemorate Shambhala, and commissioned thousands of monumental thanghkas to inspire their subjects to fight Islam. Some of these paintings will be on display at the Rubin Museum of Art in a new show, “Faith and Empire,” which opens in February. One of the contributors to the show’s catalogue is Johan Elverskog of Southern Methodist University in Dallas. He also attended our conference in Beijing and we spent an enjoyable morning walking the palaces and discussing Islam in China, then and now.

“We can’t say that Islam is incompatible with China or Chinese culture,” Elverskog told me. “Islam has been in China for 1,300 years and for most of the time the interactions were peaceful.”

The problem was that the Qing’s Buddhist political-religious utopia excluded Muslims. As Elverskog describes in his catalogue essay, by the eighteenth century the Qing court drafted discriminatory regulations aimed at Muslims, such as the declaration of any group of three or more Muslims who carried a weapon as criminals.

This drove moderate Muslims into the arms of Muslim rebels, exacerbating the Qing’s problems. In a downward spiral that sounds depressingly familiar, the state reacted with more violence while using the Shambhala myth to mobilize Qing supporters. A huge painting held at the Musée Guimet, which will be shown at the Rubin, depicts the mountain redoubt on the right and, on the left, the final battle against Islam.

*

Today, though the state no longer adopts the utopianism of a Buddhist religious state, it does have a similarly coercive, assimilationist policy toward its ethnic minorities. When the ethnic Chinese Communist Party took over in 1949, it copied the Stalinist policy of creating nationalities. Fifty-six were identified, including Chinese, Mongolians, and Uighurs, each officially celebrated as comprising a mosaic of groups that formed the People’s Republic.

As in imperial times, this policy was less tolerant than it seemed. In the Mao era, all minorities were supposed to meld into a great Communist brotherhood. In the reform era from the late 1970s to about 2010, development was meant to eradicate all differences, with ethnic groups pursuing money instead of their own cultures.

More recently, the state has taken a more overt policy of Han Chinese chauvinism. Thus the state produces strange statements, such as celebrating Chinese myths, such as declaring the Yellow Emperor the “founder of the Chinese nation,” when, in fact, the nation of China is made up of multiple ethnicities, most of which have no link to the Yellow Emperor. It has also taken steps to reduce Islam’s (and Christianity’s) visibility in China by tearing down churches and mosques—while promoting what it sees as indigenous religions: Buddhism, Taoism, and folk religion.

This prejudicial policy is a leading reason for Xinjiang’s suffering. While cloaked in the war on terrorism, many of the state’s actions are aimed at Islam itself. Shops in Xinjiang have been forced to sell alcohol and tobacco, while university students have been forbidden to fast during Ramadan. Women with veils and men with beards have been systematically barred from some local public transportation.

This has culminated in the reintroduction of a Mao-era measure: re-education camps. Then, the idea was to punish people who had the wrong class background; now, it is Muslims who have not assimilated enough. At first, reports of this seemed like a rumor, perhaps an exaggeration—something that seemed an impossibility in the twenty-first century. Recently, though, the state has admitted they exist, saying they are needed to control extremism.

Over the past four years, the Communist Party has also sent one million ethnic Chinese members to live among Uighurs to teach them the joys of secular life. As the anthropologist Darren Byler described in an extensive exposé on the Asia Society’s ChinaFile website, this involves keeping an eye out for what the state sees as extremist behavior, such as Uighurs’ not watching state-run television or having religious devotional materials hanging from their walls. At first, this seemed to many like another can’t-be-true moment, but Chinese state media has since confirmed it.

In recent months, there are signs that the campaign has moved beyond Xinjiang to the Hui Muslims, the descendants of the first Muslims, who are centered in Ningxia province but also live scattered across China. In Ningxia, Islamic domes and signs in Arabic are being pulled down, while the call to prayer has been banned.

It would be tempting to say that all of this is just typical Communist excess, something in the party’s DNA that forces it to turn to repression and violence to solve problems. But the long history of Islam’s persecution points to older, deeper problems in the Chinese worldview. Most worrisome, it is these very traditions that the state is promoting as a way to bolster its legitimacy, instead of building a pluralistic society open to different faiths, beliefs, and convictions.