# History of religion in China

Forms of religion in China throughout history have included animism during the Xia dynasty, which evolved into the state religion of the Shang and Zhou. Alongside an ever-present undercurrent of Chinese folk religion, highly literary, systematised currents related to Taoism and Confucianism emerged during the Spring and Autumn period. Buddhism began to influence China during the Han dynasty, and Christianity and Islam appeared during the Tang.
Today, while the government of China is officially atheist, it recognises five official religious bodies assigned to major organised religions in the country: Buddhism, Taoism, Catholicism, Protestantism, and Islam.

## Proto-Chinese and pre-imperial culture

Prior to the formation of Chinese civilisation and the spread of world religions in the region known today as East Asia (which includes the territorial boundaries of modern-day China), local tribes shared animistic, shamanic and totemic worldviews. Shamans acted like mediators, communicating prayers, sacrifices, or offerings directly to the spiritual world, a heritage that survives in some modern forms of Chinese religion.
Ancient shamanism is especially connected to ancient Neolithic cultures such as the Hongshan culture. The Flemish philosopher Ulrich Libbrecht traces the origins of some features of Taoism to what Jan Jakob Maria de Groot called "Wuism", that is Chinese shamanism.
Libbrecht distinguishes two layers in the development of the Chinese theology and religion that continues to this day, traditions derived respectively from the Shang (c. 1600 – 1046 BCE) and subsequent Zhou dynasties (1046–256 BCE). The religion of the Shang was based on the worship of ancestors and god-kings, who survived as unseen divine forces after death. They were not transcendent entities, since the universe was "by itself so", not created by a force outside of it but generated by internal rhythms and cosmic powers. The royal ancestors were called dì (帝; 'deities'), and the utmost progenitor was Shangdi ('highest deity'). Shangdi is identified with the dragon, symbol of the unlimited power (qi), of the "protean" primordial power which embodies yin and yang in unity, associated to the constellation Draco which winds around the north ecliptic pole, and slithers between the Little and Big Dippers. Already in Shang theology, the multiplicity of gods of nature and ancestors were viewed as parts of Di, and the four fāng (方; 'directions') and their fēng (風; 'winds') as his cosmic will.
The Zhou dynasty, which overthrew the Shang, was more rooted in an agricultural world view, and they emphasised a more universal idea of Tian. The Shang dynasty's identification of Shangdi as their ancestor-god had asserted their claim to power by divine right; the Zhou transformed this claim into a legitimacy based on moral power, the Mandate of Heaven. In Zhou theology, Tian had no singular earthly progeny, but bestowed divine favour on virtuous rulers. Zhou kings declared that their victory over the Shang was because they were virtuous and loved their people, while the Shang were tyrants and thus were deprived of power by Tian.
John C. Didier and David Pankenier relate the shapes of both the ancient Chinese characters for Di and Tian to the patterns of stars in the northern skies, either drawn, in Didier's theory by connecting the constellations bracketing the north celestial pole as a square, or in Pankenier's theory by connecting some of the stars which form the constellations of the Big Dipper, more broadly Ursa Major and Ursa Minor. Cultures in other parts of the world have also conceived these stars or constellations as symbols of the origin of things, the supreme godhead, divinity and royal power.

## Latter Zhou and Warring States

By the 6th century BCE the power of Tian and the symbols that represented it on earth (architecture of cities, temples, altars and ritual cauldrons, and the Zhou ritual system) became "diffuse" and claimed by different potentates in the Zhou states to legitimise economic, political, and military ambitions. Divine right no longer was an exclusive privilege of the Zhou royal house, but might be bought by anyone able to afford the elaborate ceremonies and the old and new rites required to access the authority of Tian.
Besides the waning Zhou ritual system, what may be defined as 'wild' (野; yě) traditions, or traditions "outside of the official system", developed as attempts to access the will of Tian. The population had lost faith in the official tradition, which was no longer perceived as an effective way to communicate with Heaven. The traditions of the "Nine Fields" (九野; jiǔyě) and of the Yijing flourished. Chinese thinkers, faced with this challenge to legitimacy, diverged in a "Hundred Schools of Thought", each proposing its own theories for the reconstruction of the Zhou moral order.

### Background of Confucianism

Confucius (551–479 BCE) appeared in this period of political decadence and spiritual questioning. He was educated in Shang-Zhou theology, which he contributed to transmit and reformulate giving centrality to self-cultivation and human agency, and the educational power of the self-established individual in assisting others to establish themselves (the principle of 'loving others'. As the Zhou reign collapsed, traditional values were abandoned resulting in a period of moral decline. Confucius saw an opportunity to reinforce values of compassion and tradition into society. Disillusioned with the widespread vulgarisation of the rituals to access Tian, he began to preach an ethical interpretation of traditional Zhou religion. In his view, the power of Tian is immanent, and responds positively to the sincere heart driven by humaneness and rightness, decency and altruism. Confucius conceived these qualities as the foundation needed to restore socio-political harmony. Like many contemporaries, Confucius saw ritual practices as efficacious ways to access Tian, but he thought that the crucial knot was the state of meditation that participants enter prior to engage in the ritual acts. Confucius amended and re-codified the classical books inherited from the Xia, Shang, and Zhou dynasties, and composed the Spring and Autumn Annals.
Philosophers in the Warring States compiled in the Analects, and formulated the classical metaphysics which became the lash of Confucianism. In accordance with the Master, they identified mental tranquillity as the state of Tian, or the One (一; yī), which in each individual is the Heaven-bestowed divine power to rule one's own life and the world. Going beyond the Master, they theorised the oneness of production and reabsorption into the cosmic source, and the possibility to understand and therefore reattain it through meditation. This line of thought would have influenced all Chinese individual and collective-political mystical theories and practices thereafter.
According to Zhou Youguang, the word for Confucius's occupation (儒; rú), originally referred to shamanic methods of holding rites and existed before Confucius' times, but with Confucius it came to mean devotion to propagating such teachings to bring civilisation to the people. Confucianism was initiated by Confucius, developed by Mencius (c. 372-289 BCE) and inherited by later generations, undergoing constant transformations and restructuring since its establishment, but preserving the principles of humaneness and righteousness at its core.

## Qin and Han dynasties

The Qin (221–206 BCE), and especially Han dynasty (206 BCE–220 CE), inherited the philosophical developments of the Warring States period moulding them into a universalistic philosophy, cosmology and religion. It was in this period that religious focus shifted to the Earth, regarded as representative of Heaven's power. In the Han period, the philosophical concern was especially the crucial role of the human being on earth, completing the cosmological trinity of Heaven-Earth-humanity (天地人; Tiāndìrén). Han philosophers conceived the immanent virtue of Tian as working through earth and humanity to complete the 'space-time'.
The short-lived Qin dynasty started by Qin Shi Huang (r. 247–220 BCE), who reunified the Warring States and was the first Chinese ruler to use the title of "emperor", chose Legalism as the state ideology, banning and persecuting all other schools of thought. Confucianism was harshly suppressed, with the burning of Confucian classics and killing of scholars who espoused the Confucian cause. The state ritual of the Qin was indeed similar to that of the following Han dynasty. Qin Shihuang personally held sacrifices to Di at Mount Tai, a site dedicated to the worship of the supreme God since pre-Xia times, and in the suburbs of the capital Xianyang. The emperors of Qin also concentrated the cults of the five forms of God, previously held at different locations, in unified temple complexes.
The universal religion of the Han, which became connected at an early time with the proto-Taoist Huang–Lao movement, was focused on the idea of the incarnation of God as the Yellow Emperor, the central one of the Wufang Shangdi. The idea of the incarnation of God was not new, as already the Shang royal lineage regarded themselves as divine. Their progenitors were "sons of God", born by women who "stepped on the imprinting" of Di. This was also true for royal ancestors of the early Zhou dynasty. The difference rests upon the fact that the Yellow Emperor was no longer an exclusive ancestor of some royal lineage, but rather a more universal archetype of the human being. The competing factions of the Confucians and the fangshi, regarded as representatives of the ancient religious tradition inherited from previous dynasties, concurred in the formulation of Han state religion, the former pushing for a centralisation of religio-political power around the worship of the God of Heaven by the emperor, while the latter emphasising the multiplicity of the local gods and the theology of the Yellow Emperor. Besides these developments of common Chinese and Confucian state religion, the latter Han dynasty was characterised by new religious phenomena: the emergence of Taoism outside state orthodoxy, the rise of indigenous millenarian religious movements, and the introduction of the foreign religion of Buddhism.

### Yellow Emperor cult

By the Han dynasty, the universal god of early Shang–Zhou theology had found a new expression with the use of the names of Taiyi, "Supreme Oneness of the Central Yellow" (中黄太乙; Zhōnghuáng tàiyǐ), or the "Yellow God of the Northern Dipper" (i.e. Ursa Major), other than by names inherited from the previous tradition. Although the name Taiyi became prominent in the Han, it harkens back to the Warring States, as attested in the poem The Supreme Oneness Gives Birth to Water, and possibly to the Shang dynasty as Dayi (大一; 'great oneness'), an alternative name for Shang's (and universe's) greatest ancestor. Han theology focalised on the Yellow Emperor, a culture hero and creator of civility, who, according to a definition in apocryphal texts related to the Yellow River Map, "proceeds from the essence of the Yellow God of the Northern Dipper", is born to "a daughter of a chthonic deity", and as such he is "a cosmic product of the conflation of Heaven and Earth".
In the myth, the Yellow Emperor was conceived by a virgin mother, Fubao, who was impregnated by Taiyi's radiance (yuanqi, "primordial pneuma") from the Big Dipper after she gazed at it. Through his human side, he had 有熊氏; Yǒuxióng; 'the lineage of the bear', another reference to the Ursa Major. Didier has studied the parallels that the Yellow Emperor's mythology has in other cultures, deducing a plausible ancient origin of the myth in Siberia or in north Asia.
In latter Han-dynasty description of the cosmology of the five forms of God by Sima Qian, it is important that the Yellow Emperor was portrayed as the grandfather of the Black Emperor of the north who personifies as well the pole stars, and as the tamer of the Flaming Emperor, his half-brother, who is the spirit of the southern Chinese populations known collectively as Chu in the Zhou dynasty.
Emperor Wu of Han (142–87 BCE), under the influence of the scholar Dong Zhongshu (who incorporated into Confucianism the man-focused developments of the common religion, formulating the doctrine of the Interactions Between Heaven and Mankind), and of prominent fangshi, officially integrated the Confucian state religion and ritual inherited from the erstwhile dynasties with the theology of Taiyi, while outside the state religion the Yellow God was the focus of Huang-Lao religious movements which influenced the primitive Taoist Church. Before the Confucian turn of Emperor Wu and after him, the early and latter Han dynasty had Huang-Lao as the state doctrine under various emperors; in Huang-Lao, the philosopher-god Laozi was identified as the Yellow Emperor and received imperial sacrifices, for instance by Emperor Huan (146–168).

### Popular millenarian and early Taoist churches in later Han period

The latter Eastern Han dynasty (25–220 CE) struggled with both internal instability and menace by non-Chinese peoples from the outer edges of the empire. Prospects for a better personal life and salvation appealed to the masses who were periodically hit by natural disasters and galvanised by uprisings organised by self-proclaimed "kings" and "heirs". In such harsh conditions, while the imperial cult continued the sacrifices to the cosmological gods, common people estranged from the rationalism of the state religion found solace in enlightened masters and in reviving and perpetuating more or less abandoned cults of national, regional and local divinities that better represented indigenous identities. The Han state religion itself was "ethnicised" by associating the cosmological deities to regional populations.
By the end of the dynasty (206 BCE–8 CE) the earliest record of a mass religious movement attests the excitement provoked by the belief in the imminent advent of the Queen Mother of the West in the northeastern provinces (then Henan, Hebei and Shandong) in the first half of the year 3 BCE. Though the soteriological movement included improper and possibly reprehensible collective behaviour, it was not crushed by the government. Indeed, from the elites' point of view, the movement was connected to a series of abnormal cosmic phenomena seen as characteristic of an excess of yin.
Between 184 and 205 CE, the Way of the Supreme Peace (太平道; Tàipíngdào) in the Central Plains, the earliest attested popular Taoist religious-military movement led by members of the Zhang lineage—prominently Zhang Jue and Zhang Liu, among leaders from other families—, organised the so-called Yellow Turban Rebellion against the Han dynasty. Later Taoist religious movements flourished in the Han state of Shu (modern Sichuan). A wu ('shaman') of the Supreme Peace named Zhang Xiu was known to have led a group of followers from Shu into the uprising of the year 184. In 191 he reappeared as a military official in the province, together with the apparently unrelated Zhang Lu. During a military mission in Hanning (modern southwest Shaanxi), Xiu either died in battle or was killed by Lu himself, who incorporated Xiu's followers and seized the city, which he renamed Hanzhong. A characteristic of the territory governed by Lu was its significant non-Chinese population. Between 143 and 198, starting with the grandfather Zhang Daoling and culminating with Zhang Lu, the Zhang lineage had been organising the territory into dioceses or parishes, establishing a Taoist theocracy, the early Celestial Masters' church—in Chinese variously called Way of the Five Pecks of Rice, and later Way of the Celestial Masters. Zhang Lu died in 216 or 217, and between 215 and 219 the people of Hanzhong were gradually dispersed northwards, implanting Celestial Masters' Taoism in other parts of the empire.

### Introduction of Buddhism

Buddhism was introduced during the latter Han dynasty, and first mentioned in 65 CE.$^{:821–822}$ Liu Ying, a half brother of Emperor Ming of Han (57–75 CE) was one of the earliest Chinese adherents, at a time when the imported religion interacted with Huang-Lao proto-Taoism.$^{:821–822}$ China's earliest known Buddhist temple, the White Horse Temple, was established outside the walls of Luoyang during Emperor Ming's reign.$^{:823}$
Buddhism entered China via the Silk Road, transmitted by the Buddhist populations who inhabited the Western Regions, modern Xinjiang, then Indo-Europeans—predominantly Tocharians and Saka. It began to grow to become a significant influence in China proper only after the fall of the Han dynasty, in the period of political division. When Buddhism had become an established religion it began to compete with Chinese indigenous religion and Taoist movements, deprecatorily designated as Ways of Demons (鬼道; guǐdào) in Buddhist polemical literature.

## Six Dynasties period

After the fall of the Han, a period of disunity referred to as the Six Dynasties began. After the first stage of the Three Kingdoms (220–280), China was partially unified under the Jin, while much of the north was governed by various independent states. The fall of Luoyang to the Xiongnu in 311 led the royal court and Celestial Masters' clerics to migrate southwards. Jiangnan became the centre of the "southern tradition" of Celestial Masters' Taoism, which developed characteristic features, among which a meditation technique known as "guarding the One"—that is, visualising the unity God in the human organism.$^{:3.2}$
Representatives of Jiangnan's indigenous religions responded to the spread of Celestial Masters' Taoism by reformulating their own traditions according to the imported religion. This led to the foundation of two new Taoist schools, with their own scriptural and ritual bodies: Shangqing Taoism, based on revelations that occurred between 364 and 370 in modern-day Nanjing, and Lingbao Taoism, based on revelations of the years between 397 and 402 and re-codified by Lu Xiujing (406–477). Lingbao incorporated ideas of "universal salvation" and ranked "heavens" from Buddhism, and emphasised communal ritual.$^{:3.3}$
Buddhism brought a model of afterlife to Chinese people and had a deep influence on Chinese culture. For example, the 3rd century parable Mulian Rescues His Mother adapts a Buddhist fable to show Confucian values of filial piety. In the story, a virtuous monk descends into hell to rescue his mother, who had been condemned for her transgressions.

## Sui and Tang dynasties
### Sui dynasty

Buddhism was popular during the Sixteen Kingdoms and Northern and Southern dynasties period that preceded the Sui dynasty, spreading from India through Kushan Afghanistan into China during the Late Han period. Buddhism gained prominence during the period when central political control was limited. Buddhism created a unifying cultural force that uplifted the people out of war and into the Sui dynasty. In many ways, Buddhism was responsible for the rebirth of culture in China under the Sui dynasty. While early Buddhist teachings were acquired from Sanskrit sutras, it was during the late Six dynasties and Sui dynasty that local Chinese schools of Buddhist thoughts started to flourish. Most notably, Zhiyi founded the Tiantai school, and completed the Great treatise on Concentration and Insight, within which he taught the principle of "Three Thousand Realms in a Single moment of Life" as the essence of Buddhist teaching outlined in the Lotus Sutra.
Emperor Wen and his empress had converted to Buddhism to legitimise imperial authority over China and the conquest of Chen. The emperor presented himself as a Cakravartin king, a Buddhist monarch who would use military force to defend the Buddhist faith. In the year 601 AD, Emperor Wen had relics of the Buddha distributed to temples throughout China, with edicts that expressed his goals, "all the people within the Four Seas may, without exception, develop enlightenment and together cultivate fortunate karma, bringing it to pass that present existences will lead to happy future lives, that the sustained creation of good causation will carry us one and all up to wondrous enlightenment".$^{:89}$ Ultimately, this act was an imitation of the ancient Mauryan Emperor Ashoka of India.$^{:89}$ Similarly, The Sui court pursued a pro-Taoist policy. The first reign of the dynasty saw the state promoting the Northern Louguan school of Taoism, while the second reign instead promoted the Southern Shangqing school of Taoism, possibly due to Emperor Yang's preference for Southern culture. and Confucian philosopher Wang Tong wrote and taught during the Sui dynasty, and even briefly held office as Secretary of Shuzhou. His most famous (as well as only surviving) work, the Explanation of the Mean (Zhongshuo, 中說) was compiled shortly after his death in 617.

### Tang dynasty

In the Tang dynasty (618–907 CE) the concept of Tian became more common at the expense of Di, continuing a tendency that started in the Han dynasty. Both also expanded their meanings, with di now more frequently used as suffix of a deity's name rather than to refer to the supreme power. Tian, besides, became more associated to its meaning of "Heaven" as a paradise, or the hierarchy of physical skies. The proliferation of foreign religions in the Tang, especially Buddhist sects, entailed that each of them conceived their own ideal "Heaven". Tian itself started to be used, linguistically, as an affix in composite names to mean "heavenly" or "divine". This was also the case in the Buddhist context, with many monasteries' names containing this element.
Under the influence of foreign cultures and thought systems, new concepts to refer to the supreme God were formulated, such as Tiānzhōngtiān (天中天; 'God of the Gods'), seemingly introduced by Yuezhi Buddhist missionaries to render the Sanskrit Devātideva (of the same meaning) or Bhagavān from their Iranian sources.
Both Buddhism and Taoism developed hierarchic pantheons which merged metaphysical and physical being, blurring the edge between the human and the divine, which reinforced the religious belief that gods and devotees sustain one another.
The earliest evidence of Christianity in China dates to the Eighth century.$^{:181}$ It is a stone stele in Xi'an inscribed with a general summary of basic Nestorian teachings.$^{:181}$

### City Gods cult

The principle of reciprocity between the human and the divine, which was strengthened during the Tang dynasty, led to changes in the pantheon that reflected changes in the society. The late Tang dynasty saw the spread of the cult of the City Gods in direct bond to the development of the cities as centres of commerce and the rise in influence of merchant classes. Commercial travel opened China to influences from foreign cultures.
The City God is a protector of the boundaries of a city and of its internal and economic affairs, such as trade and elections of politicians. In each city, the respective City God is embodied by one or more historical personages, native of the city itself, who distinguished themselves by extraordinary attainments. Scholar Valerie Hansen argues that the City God is not a home-grown cult, but has its prototype in the Indian Vaiśravaṇa as a guardian deity.

### Three Persian religions

The three Persian religions, as a medieval Chinese concept, referred to a group of Iranian religions that spread to Tang China. They were recognised and protected under Tang rule, helping them to prosper in China at a time when the Sasanian Empire was falling to the early Muslim conquests. The three religious movements identified by the term were Zoroastrianism, the Persian Church, and Manichaeism.

### Suppressions of Buddhism and foreign religions

Emperor Wuzong of Tang persecuted various religious deemed to be "foreign", especially Buddhists, during the Huichang era (841–845). Among the purposes of the persecution were to appropriate war funds and to cleanse Tang China of foreign influences. As such, the persecution was directed not only towards Buddhism but also towards other religions, such as Zoroastrianism, Nestorianism, and Manichaeism.

### Liao dynasty

Religion in Liao society was a synthesis of Buddhism, Confucianism, Daoism, and Khitan tribal religion. During Abaoji's reign, temples of all three major religions were constructed, but afterwards, imperial patronage was restricted mainly to Buddhism, which by the early tenth century, the majority of Khitans had adopted. The Buddha was considered a protective deity by the Khitans, who named him "The Benevolent King Who Guards the Country." They invoked Buddhism whenever they went to war and made massive offerings to placate the souls of fallen soldiers. The Liao began printing Buddhist texts in the 990s and an entire copy of the Tripitaka was completed in 1075. Portions of it have been found in a pagoda built in 1056. Buddhist scholars living during the time of the Liao dynasty predicted that the mofa (末法), an age in which the three treasures of Buddhism would be destroyed, was to begin in the year 1052. Previous dynasties, including the Sui and Tang, were also concerned with the mofa, although their predictions for when the mofa would start were different from the one selected by the Liao. As early as the Sui dynasty, efforts were made to preserve Buddhist teachings by carving them into stone or burying them. These efforts continued into the Liao dynasty, with Emperor Xingzong funding several projects in the years immediately preceding 1052.
Some elements of traditional Khitan tribal religion continued to be observed. The Khitans worshiped the sun and the ritual position for the emperor was to face the east where the sun rose, unlike Han Chinese emperors, who faced south. Royal dwellings also faced the east. Khitans worshiped spirits of the Muye Mountain, the legendary home of the Khitans' ancestors, and a "Black Mountain." When a Khitan nobleman died, burnt offerings were sacrificed at the full and new moons. The body was exposed for three years in the mountains, after which the bones would be cremated. The Khitan believed that the souls of the dead rested at the Black Mountain, near Rehe Province. Liao burial sites indicate that animistic or shamanistic practices coexisted with Buddhism in marriage and burial ceremonies. Both animal and human sacrifices have been found in Liao tombs alongside indications of Buddhist influence. Khitan hunters offered a sacrifice to the spirit of the animal they were hunting and wore a pelt from the same animal during the hunt. There were festivals to mark the catching of the first fish and wild goose, and annual sacrifices of animals to the sky, earth, ancestors, mountains, rivers, and others. Every male Khitan would sacrifice a white horse, white sheep, and white goose during the Winter solstice. In warfare, they practiced a form of divination where the decision to carry out war was determined by whether or not the shoulder blade of a white sheep cracked while being heated (scapulimancy).
* Luohan statue, Liao dynasty, 11th century
* Liao era bronze figure of Gautama Buddha
* Bronze Guanyin statue from the Chinese section of the Supreme Capital
* Liao era painted wooden statue of Guanyin
* Bronze statue of Guanyin, Liao dynasty, 10th century

### Song dynasty
## Yuan dynasty

In the Yuan dynasty, There were many religions practiced during the Yuan dynasty, such as Buddhism, Islam, Christianity and Manichaeism. The establishment of the Yuan dynasty had dramatically increased the number of Muslims in China. However, unlike the western khanates, the Yuan dynasty never converted to Islam. Instead, Kublai Khan, the founder of the Yuan dynasty, favored Buddhism, especially the Tibetan variants. As a result, Tibetan Buddhism became the de facto state religion. The top-level department and government agency known as the Bureau of Buddhist and Tibetan Affairs (Chinese: 宣政院; pinyin: xuānzhèngyuàn) was set up in Khanbaliq (modern Beijing) to supervise Buddhist monks throughout the empire. Since Kublai Khan only esteemed the Sakya sect of Tibetan Buddhism, other religions became less important. He and his successors kept a Sakya Imperial Preceptor (Chinese: 帝师; pinyin: Dìshī) at court. Before the end of the Yuan dynasty, 14 leaders of the Sakya sect had held the post of Imperial Preceptor, thereby enjoying special power.$^{:59}$ Furthermore, Mongol patronage of Buddhism resulted in a number of monuments of Buddhist art. Mongolian Buddhist translations, almost all from Tibetan originals, began on a large scale after 1300. Many Mongols of the upper class such as the Jalayir and the Oronar nobles as well as the emperors also patronized Confucian scholars and institutions. A considerable number of Confucian and Chinese historical works were translated into the Mongolian language.

## Ming dynasty

The dynasty was started by Hongwu Emperor who was a buddhist. The Yongle Emperor and his successors strongly patronised Tibetan Buddhism by supporting construction, printing of sutras, ceremonies etc., to seek legitimacy among foreign audiences. Yongle tried to portray himself as a Buddhist ideal king, a cakravartin. There is evidence that this portrayal was successful in persuading foreign audiences. In the 16th century, Jesuit missions to China began to play a significant role in the emerging dialogue between China and the West. The Jesuits brought Western sciences, becoming advisers to the imperial court on astronomy, taught mathematics and mechanics, but also adapted Chinese religious ideas such as admiration for Confucius and ancestor veneration into the religious doctrine they taught in China.$^{:384}$

## Qing dynasty

The Qing rulers portrayed the image of themselves as Buddhist sage rulers (wheel-turning kings), patrons of Tibetan Buddhism to maintain legitimacy for Tibetan Buddhists. Mongol subjects also commonly referred to the Qing ruler as Bogda Khan, while Turkic Muslim subjects (now known as the Uyghurs) commonly referred to the Qing ruler as Chinese khagan. Tibetan Buddhism began in this period to have significant presence in China, with Tibetan influence in the west, and with the Mongols and Manchus in the north.
Following the British Empire's defeat of China in the First Opium War (1839–1841), China was required to permit foreign missionaries.$^{:182}$ The unequal treaties gave European powers jurisdiction over missions and some authority over Chinese Christians.$^{:182}$
Later, many folk religious and institutional religious temples were destroyed during the Taiping Rebellion (1850–1871). It was organised by Christian movements which established a separate state in southeast China against the Qing dynasty. In the Christian-inspired Taiping Heavenly Kingdom, official policies pursued the elimination of Chinese religions to substitute them with forms of Christianity. In this effort, the libraries of the Buddhist monasteries were destroyed, almost completely in the Yangtze River Delta.
As a reaction, the Boxer Rebellion at the turn of the century (1899–1901) would have been inspired by indigenous Chinese movements against the influence of Christian missionaries—"devils" as they were called by the Boxers—and Western colonialism. At that time China was being gradually invaded by European and American powers, and since 1860 Christian missionaries had had the right to build or rent premises, and they appropriated many temples. Churches with their high steeples and foreigners' infrastructures, factories and mines were viewed as disrupting feng shui and caused "tremendous offence" to the Chinese. The Boxers' action was aimed at sabotaging or outright destroying the infrastructure.

## Early 20th century

China entered the 20th century under the Manchu Qing dynasty, whose rulers favoured traditional Chinese religions, and participated in public religious ceremonies, with state pomp, as at the Temple of Heaven in Beijing, where prayers for the harvest were offered. Tibetan Buddhists recognised the Dalai Lama as their spiritual and temporal leader. Popular cults were regulated by imperial policies, promoting certain deities while suppressing others. During the anti-foreign and anti-Christian Boxer Uprising of 1900, thousands of Chinese Christians and foreign missionaries were killed, but in the aftermath of the retaliatory invasion, numbers of reform-minded Chinese turned to Christianity. Between 1898 and 1904 the imperial government issued a measure to "build schools with temple property".$^{:3}$
After the 1911 Xinhai Revolution, with increasing urbanisation and Western influence, the issue for the new intellectual class was no longer the worship of heterodox gods as it was the case in imperial times, but the de-legitimisation of religion itself, and especially folk religion, as an obstacle to modernisation. Leaders of the New Culture Movement (1916–1923) revolted against Confucianism debated whether religion was cosmopolitan spirituality or irrational superstition, and the Anti-Christian Movement of 1923 was part of a rejection of Christianity as an instrument of foreign imperialism. Despite all this, the interest of Chinese reformers for spiritual and occult matters continued to thrive through the 1940s.
The Nationalist government of the Republic of China intensified the suppression of local religion. Temples were widely appropriated, destroyed, or used for schools. The 1928 "Standards for retaining or abolishing gods and shrines" formally abolished all cults of gods with the exception of human heroes such as Yu the Great, Guan Yu and Confucius. Sun Yat-sen, the first president of the Republic of China, and his successor Chiang Kai-shek were both Christians. During the Japanese invasion of China between 1937 and 1945 many temples were used as barracks by soldiers and destroyed in warfare.

## People's Republic of China

The People's Republic of China, proclaimed in 1949 under the leadership of Mao Zedong, established a policy of state atheism. Initially, the new government did not suppress religious practice, but, like its dynastic ancestors, viewed popular religious movements, especially in the countryside, as possibly seditious. The government condemned religious organisations, labelling them as "superstitious". Religions deemed "appropriate" and given freedom were those that entailed the ancestral tradition of consolidated state rule. In addition, Marxism viewed many forms of religion as inherently feudal. The Three-Self Patriotic Movement institutionalised Protestant churches in official organisations that renounced foreign funding and foreign control as imperialist. Chinese Catholics resisted the new government's move towards state control and independence from the Vatican. The Cultural Revolution (1966–1976) involved systematic efforts to destroy religion.
The policy relaxed considerably in the late 1970s. Since 1978, the Constitution of the People's Republic of China guarantees freedom of religion. Article 36 states:
   Citizens of the People's Republic of China enjoy freedom of religious belief. No state organ, public organization or individual may compel citizens to believe in, or not to believe in, any religion; nor may they discriminate against citizens who believe in, or do not believe in, any religion. The state protects normal religious activities. No one may make use of religion to engage in activities that disrupt public order, impair the health of citizens or interfere with the educational system of the state. Religious bodies and religious affairs are not subject to any foreign domination.
In 1980, the CCP Central Committee approved a request by the United Front Work Department to create a national conference for religious groups.$^{:126–127}$ The participating religious groups were the Catholic Patriotic Association, the Islamic Association of China, the Chinese Taoist Association, the Three-Self Patriotic Movement, and the Buddhist Association of China.$^{:127}$
For several decades, the party acquiesced or even encouraged a religious revival. Most Chinese were allowed to worship as they felt best. Although "heterodox teachings" such as the Falun Gong were banned and practitioners have been persecuted since 1999, local authorities were likely to follow a hands-off policy towards other religions. In the late 20th century there was a reactivation of the state cults devoted to the Yellow Emperor and the Red Emperor. In the early 2000s, the Chinese government became open especially to traditional religions such as Mahayana Buddhism, Taoism and folk religion, emphasising the role of religion in building a "Harmonious Society", a Confucian idea. The government founded the Confucius Institute in 2004 to promote Chinese culture. China hosted religious meetings and conferences including the first World Buddhist Forum in 2006 and the subsequent World Buddhist Forums, a number of international Taoist meetings and local conferences on folk religions. Aligning with Chinese anthropologists' emphasis on "religious culture",$^{:5–7}$ the government considers these religions as integral expressions of national "Chinese culture".
A turning point was reached in 2005, when folk religious cults began to be protected and promoted under the policies of intangible cultural heritage.$^{:9}$ Not only were traditions that had been interrupted for decades resumed, but ceremonies forgotten for centuries were reinvented. The annual worship of the god Cancong of the ancient state of Shu, for instance, was resumed at a ceremonial complex near the Sanxingdui archaeological site in Sichuan. Modern Chinese political leaders have been deified into the common Chinese pantheon. The international community has become concerned about evidence that China has harvested the organs of Falun Gong practitioners and other religious minorities, including Christians and Uyghur Muslims. In 2019, a panel of lawyers concluded that organ harvesting was happening for Falun Gong followers and asked for further investigation to determine if the situation was a genocide.
In 2012, Xi Jinping was elected as the General Secretary of the Chinese Communist Party. During his early political career in the 1980s, Xi was the secretary of Zhengding County in Hebei, where he allied himself with Chan master Youming and helped the reconstruction of the county's Buddhist temples, explicitly expressing interest towards Buddhism. Once he became CCP general secretary, fighting moral void and corruption through a return to traditional culture became the primary tasks of the new government. The government's project also involved restricting Christian churches, which resulted in some removals of crosses from steeples and churches' demolition. At least one prominent pastor who protested was arrested on charges of misusing church funds. A lawyer who had counselled these churches appeared on state television to confess that he had been in collusion with American organisations to incite local Christians.
André Laliberté noted that despite there having been much talk about "persecution against religion (especially Christianity) in China", one should not jump to hasty conclusions, since "a large proportion of the population worship, pray, perform rituals and hold certain beliefs with the full support of the Party. Most of this activity affects people who subscribe to world views that are sometimes formally acknowledged by the state and are institutionalised, or others that are tacitly approved as customs". In this context, Christianity not only represents a small proportion of the population, but its adherents are still seen by the majority who observe traditional rituals as followers of a foreign religion that sets them apart from the body of society.
In September 2018, the Associated Press reported that "Xi is waging the most severe systematic suppression of Christianity in the country since religious freedom was written into the Chinese constitution in 1982", which has involved "destroying crosses, burning bibles, shutting churches and ordering followers to sign papers renouncing their faith". These abuses continued with a crackdown on all non-state religious groups and tighter control of state ones as Xi Jinping Thought was implemented. In addition to Christianity Islam has suffered from increasing repression with Muslim scholars and writers targeted by the state. Religious communities in China have been increasingly isolated from their co-religionists abroad.