Hua–Yi distinction

During the late Zhou dynasty, the inhabitants of the Central Plains began to make a distinction between Hua and Yi , referred to by some historians as the Sino–barbarian dichotomy. They defined themselves as part of cultural and political region known as Huaxia, which they contrasted with the surrounding regions home to outsiders, conventionally known as the Four Barbarians (literally, "four Yi"). Although Yi is usually translated as "barbarian", other translations of this term in English include "foreigners", "ordinary others", "wild tribes" and "uncivilized tribes". The Hua–Yi distinction asserted Chinese superiority, but implied that outsiders could become Hua by adopting their culture and customs. The Hua–Yi distinction was not unique to China, but was also applied by various Vietnamese, Japanese, and Koreans regimes, all of whom considered themselves at one point in history to be legitimate successors to the Chinese civilization and the "Central State" in imitation of China.

Historical context
Ancient China was composed of a group of states that arose in the Yellow River valley. According to historian Li Feng, during the Zhou dynasty (c. 1041–771 BCE), the contrast between the 'Chinese' Zhou and the 'non-Chinese' Xirong or Dongyi was "more political than cultural or ethnic". Lothar von Falkenhausen argues that the perceived contrast between "Chinese" and "Barbarians" was accentuated during the Eastern Zhou period (770–256 BCE), when adherence to Zhou rituals became increasingly recognised as a "barometer of civilisation"; a meter for sophistication and cultural refinement. It is widely agreed by historians that the distinction between the Hua and the Yi emerged during that period.

Gideon Shelach claimed that Chinese texts tended to overstate the distinction between the Chinese and their northern neighbours, ignoring many intergroup similarities. Nicola di Cosmo doubted the existence of a strong demarcation between the "Zhou Universe" and "a discrete, 'barbarian', non-Zhou universe" and claimed that Chinese historian Sima Qian popularised this concept, writing of the "chasm that had 'always' existed between China – the Hua-Hsia [Huaxia] people – and the various alien groups inhabiting the north."

The conclusion of the Warring States period brought the first unified Chinese state—established by the Qin dynasty in 221 BCE—who established the imperial system and forcibly standardized the traditional Chinese script, leading to the first of the distinctions between the 'refined' Hua and the increasingly marginalised Yi. The Han dynasty (221 BCE–206 CE) further contributed to the divide with its creation of a persistent Han ethnocultural identity.

The Han Chinese civilisation influenced neighbouring states Korea, Japan, Vietnam and Thailand and other Asian countries. Although Han Chinese superiority had only been sporadically reinforced by displays of Chinese military power, their Sinocentric system treated these countries as vassals of the emperor of China, "the Son of Heaven", who was in possession of the Mandate of Heaven , the divine right to rule. Areas outside Sinocentric influence and the divine rule of the Emperor were considered to consist of uncivilised lands inhabited by barbarians.

Throughout history, Chinese frontiers had been periodically attacked by nomadic tribes from the north, west and even south. These people were being labelled as barbarians by the Chinese who believed themselves to be more refined and who had begun to build cities and live an urban life based on agriculture. It was in an attempt of how best to deal with this problem that the philosopher, Confucius (551–479 BCE) was prompted to formulate principles for relationships with the barbarians, briefly recorded in two of his Analects.

Although China had been trading goods to and from Europeans for centuries, it was not until the arrival of the industrialised European trade and colonialism in the 19th and 20th centuries that exposed Chinese civilisation to technological developments that had long outdated China's. As such, Chinese society was forced to undergo a modification of its traditional views of its relationships with "barbarians", and in particular could no longer regard everyone other than Chinese as objectively inferior uncultured barbarians.

China
Confucius lived during a time of war between Chinese states. He regarded people who did not respect the traditional value of li as "barbarians", as he believed the workings of a civilised state should be founded on ethical conduct, which he said must stem from li. Confucius argued that a state founded on the relatively cruel social codes of conquest and warlordism was barbaric in contrast to one founded on the principles of stately righteousness. In Analect 3.5, Confucius said, "The Yi and Di barbarian tribes with rulers are not as viable as the various Chinese states without them."

The Disposition of Error, a fifth-century tract defending Buddhism, notes that when Confucius was threatening to take residence among the nine barbarian states he said, "If a gentleman-scholar dwells in their midst, what baseness can there be among them?" An alternate translation of the philosopher's Analect 9.14 is, "Someone said: 'They are vulgar. What can you do about them?' The Master said: 'A gentleman used to live there. How could they be vulgar?'" In both translations, the author is shown to believe in the superiority of the Hua culture over that of the Yi.

The prominent Shuowen Jiezi character dictionary (121 CE) defines yi as "level; peaceful" or "people of eastern regions"  and does not attempt to marginalise them. This implies that the Hua-Yi distinction was not universally held.

Zhou dynasty
The Bamboo Annals record that the founder of Zhou, King Wu of Zhou "led the lords of the western barbarians" on a journey to conquer the Shang dynasty, leading to the creation of the Zhou Dynasty. The Zhou would later contribute as much as the Shang to the Hua–Yi distinction.

Not all Zhou regarded the Hua–Yi distinction as a cultural barrier that needed to be overcome to 'purify' China. Zhou philosopher Mencius believed that Confucian practices were universal and timeless, and thus, followed by both Hua and Yi people."Shun was an Eastern barbarian; he was born in Chu Feng, moved to Fu Hsia, and died in Ming T'iao. King Wen was a Western barbarian; he was born in Ch'i Chou and died in Pi Ying. Their native places were over a thousand li apart, and there were a thousand years between them. Yet when they had their way in the Central Kingdoms, their actions matched like the two halves of a tally. The standards of the two sages, one earlier and one later, were identical."

Jin dynasty
In order to alleviate the shortages of labour caused by the Three Kingdoms wars, the Jin allowed millions of "barbarian" people to reside in Jin territory. Many officials opposed this decision in the name of the Hua–Yi distinction, claiming that if the barbarians did not identify with the Huaxia, they would conspire to destroy the empire.

Sixteen Kingdoms
During the Uprising of the Five Barbarians and ravaging of North China that occurred at the start of the 4th century, the Jin dynasty and other ethnic Han appealed to entrenched beliefs in the Hua–Yi distinction when calling for resistance to the Five Barbarians and the Yi they represented. The Jin was eventually driven out of the north and relocated south of the Yangtze River. The historians of the Southern dynasties, who were all Han Chinese, portrayed the non-Han rulers as barbaric.

Meanwhile, the "Five Barbarians", who founded several of the Sixteen Kingdoms in northern China and Sichuan, often had to cooperate with the local Han people to consolidate their rules. The first two of the Sixteen Kingdoms, the Han-Zhao and Cheng-Han dynasties, adopted the Chinese ruling systems and customs, with the former initially claiming to be a continuation of the Han dynasty. On the other hand, some of the barbarian states also established separate governing bodies for the "Han" and "Hu".

Ran Min's order to kill the "barbarians"
The Later Zhao dynasty was founded the Shi clan of Jie ethnicity, who had a practice of heavily adopting people into their family. One of these people was Shi Min (later named Ran Min), a Han Chinese who was the adoptive grandson of Later Zhao's third ruler, Shi Hu. In 349 CE, after his promise to be made Crown Prince was reneged, Shi Min seized control of the emperor and the capital, Ye. Due to multiple attempts on his life, he soon became apprehensive of the non-Han tribes and ordered the Han people to slaughter the Jie people and other barbarians, identifying them by their high noses and full beards. Around 200,000 people were killed, with the Jie soon disappearing from history, but a large number of victims were also mistakenly-identified Han Chinese people. After Ran Min founded his state of Ran Wei in 350, he attempted to win back the support of the tribes, but in 352, his regime was toppled by the Xianbei-led Former Yan dynasty.

Ran Min continues to be a controversial figure. He is considered by some to be a hero, whereas others believe he bore extreme prejudice arising from the Hua–Yi distinction.

Northern Wei dynasty
Emperor Xiaowen of Northern Wei (a state that controlled the north of China), who was of the Xianbei people attempted to eliminate Yi from his state by imposing Sinicisation on his people. The Xianbei language was outlawed and Xianbei people began to adopt surnames of the Han ethnicity; for example, the ruling clan of the Northern Wei originally bore the surname Tuoba but it was abandoned in favor of Yuan.

Sui dynasty
In 581, the Sui emperor Yang Jian deposed the Xianbei ruler of Northern Zhou and restored Han rule over North China. This event marked the end of all power that the Xianbei and other non-Han groups had over China, and racial tension subsided.

Tang dynasty
During the Tang dynasty, various ethnic groups including Koreans, Indians and Tibetans journeyed to Chang'an and other major Tang cities for business or study. These people brought their religions and customs: Buddhism, Islam, Zoroastrianism (Xianjiao), Manichaeism (Monijiao) and Syriac Christianity (Jingjiao), all of which flourished.

This cosmopolitan policy caused controversy among the literati, many of whom questioned the recommendation of the Kaifeng governor for the participation of Arab-born Li Yan-sheng in the 847 imperial examinations and several similar incidences of what they believed as incorrect racial privileging. Such was the discourse that Tang intellectual Chen An wrote an essay defending the governor's decision; The Heart of Being Hua, which is often cited as expressing the sentiments of the "non-xenophobic" Chinese position on the Hua–Yi distinction. In the essay, Chen wrote: "If one speaks in terms of geography, then there are Hua and Yi. But if one speaks in terms of education, then there can be no such difference. For the distinction between Hua and Yi rests in the heart and is determined by their different inclinations."

A prominent Tang Confucian, Han Yu, wrote in his essay Yuan Dao, "When Confucius wrote the Chunqiu, he said that if the feudal lords use the Yi ritual, then they should be called Yi. If they use Chinese rituals, then they should be called Chinese." Han Yu went on to lament that the Chinese of his time might all become Yi because the Tang court wanted to put Yi laws above the teachings of the former kings, creating the possibility that although insiders could lose their culture, outsiders could similarly gain insider culture.

Arguments that excoriated the Tang's lax attitude towards foreigners were strengthened by the Yi-led An Lushan Rebellion (755–763), which propelled the Tang into decline. An intellectual movement "to return to the pure... sources of orthodox thought and morality", including many of the concepts of the Classical Prose Movement, also targeted "foreign" religions, as exemplified by Han Yu's diatribe against Buddhism. Emperor Wenzong of Tang passed decrees in line with these views, especially restricting Iranian religions and Buddhism, but this policy was relaxed by his successors.

Five Dynasties and Ten Kingdoms
The "Five Dynasties and Ten Kingdoms" was a period in which the north of China was ruled by a non-Han people, the Shatuo, for three short-lived dynasties while the south was ruled by ethnic Han. Their legitimacy was recognised by the Song dynasty.

Song dynasty
The Song dynasty saw both an economic boom and invasion by alien states. States like the Liao dynasty and Western Xia began to take territories inhabited by large numbers of Chinese and asserted that they too were Chinese and successors to the Tang, and posed legitimacy issues for Song rule.

In response to rising concerns from citizenry and claims from Yi states such as the Western Xia, Song scholars stipulated that groups like the Shatuo (whom the Song largely succeeded and who largely continued the rule of the Tang) were not barbarian or "Yi" but Chinese or "Hua" and that the Song had only descended from ruling groups that were Hua. Secondly, the Song asserted that the Liao and Western Xia, and later the Jin, were barbarian states despite their control of large areas of traditional Han territory because they had not inherited any mandate from a legitimate, "Hua" dynasty.

Yuan dynasty
Concerns over legitimacy were not limited to the Song alone: states rose up again in the Yuan dynasty, as its rulers were non-Han. However, the Yuan dynasty adopted a different approach to quelling the conflict. The Yuan asserted that the Song, Liao and Jin were all legitimate; therefore all three dynasties were given their own history, as recognition of their legitimacy.

Despite this, the Yuan racially segregated their people; dividing society into four categories:
 * 1) Mongols: the ruling group and hence, the most important
 * 2) Semu ("assorted categories"): a term for non-Chinese and non-Mongol foreigners who occupied the second slate;
 * 3) Han (漢人): a term for the Han Chinese, Jurchens, and Khitan under the rule of the Jin dynasty;
 * 4) Southerner (南人): a term for Han Chinese under the rule of the Song dynasty.

In addition, the Yuan also divided society into 10 castes, based on "desirability":
 * 1) High officials (官)
 * 2) Minor officials (吏)
 * 3) Buddhist monks (僧)
 * 4) Taoist priests (道)
 * 5) Physicians (医)
 * 6) Peasants (農)
 * 7) Hunters (獵)
 * 8) Courtesans (妓)
 * 9) Confucian scholars (儒)
 * 10) Beggars (丐)

The Yuan rulers were ethnic Mongols and were viewed as barbaric by the dominant Han population, although they did not last long in China proper (from 1271 to 1368).

Ming dynasty
In 1368, Zhu Yuanzhang proclaimed the Ming dynasty and issued a long manifesto, in which he labeled the Yuan as barbarians who had usurped the Chinese throne, and who had inflicted atrocities such as rape and murder. He lists incidents where the Mongols massacred men in entire villages and appropriated the women. Zhu's northern military expedition had been a success; Beijing was captured in the same year and China was again governed by ethnic Han.

Although the Ming referred to the preceding Yuan as the "wild Yuan" (胡元), they also accepted the Yuan before them as a legitimate dynasty. The Hongwu Emperor indicated on another occasion that he was happy to be born in the Yuan period and that the Yuan did legitimately receive the Mandate of Heaven to rule over China. In addition, one of his key advisors, Liu Ji, generally supported the idea that while the Chinese and the non-Chinese are different, they are actually equal. Liu was therefore arguing against the idea that Hua was and is superior to Yi.

During the Miao Rebellions, Ming forces engaged in massive slaughter of the Hmong and other native ethnic groups in South China; after castrating Hmong boys to use as eunuch slaves, Chinese soldiers took Hmong women as wives and colonised the southern provinces.

Towards the end of the Ming dynasty, Ming loyalists invoked the Hua-Yi distinction to urge the Chinese to resist the Manchu invaders.

Qing dynasty
The Qing dynasty's order that all subjects shave their forehead and braid the rest of their hair into a queue was viewed as a symbolic gesture of servitude by many ethnic Han, who thought that changing their dress to the same as Yi would be contrary to the spirit of the Hua-Yi distinction.

Scholar Lü Liuliang (1629–1683), who lived through the transition between the Ming and the Manchu-led Qing dynasty, refused to serve the new dynasty because he claimed that upholding the difference between Huaxia and the Yi was more important than respecting the righteous bond between minister and sovereign. In 1728, failed Imperial examination candidate Zeng Jing, influenced by Lü's works, called for the overthrow of the Manchu regime. The Yongzheng Emperor, whom Zeng accused of ten major crimes, took this event as an opportunity to educate the Qing's Chinese subjects. In a series of discussions with Zeng Jing, the emperor proclaimed that Chinese were not inherently superior to the barbarians. To justify his statements, he declared that King Wen, the sage king and the founder of the Zhou dynasty, was of Western Yi origin, but this did not hurt his greatness.

The Yongzheng Emperor also borrowed from Han Yu, indicating that Yi can become Hua and vice versa. In addition, according to Yongzheng, both Hua and Yi were now a part of the same family under the Qing. One of the goals of the tract Dayi juemi lu, which the Yongzheng Emperor published and distributed throughout the empire in 1730, was "to undermine the credibility of the hua/yi distinction." However, due to the fact that this tract also helped to expose many unsavoury aspects of court life and political intrigues in the imperial government, Yongzheng's successor the Qianlong Emperor recalled the tracts and had them burned for the fear that it would undermine the legitimacy of the Qing empire.

During the Qing, the Qing destroyed writings that criticised the Liao, Jin and Yuan using the Hua–Yi distinction.

Sun Yat-sen also used the Hua–Yi distinction to justify the overthrow of the Qing dynasty.

However, the Qing adopted Confucian philosophy and Han Chinese institutions to show that the Manchu rulers had received the Mandate of Heaven, while at the same time trying to retain their own indigenous culture. Due to the Manchus' adoption of Han Chinese culture, most Han Chinese (though not all) accepted the Manchus as the legitimate rulers.

Republic of China
Historian Frank Dikötter says the Chinese "idea of 'race' (zhong [種], "seed", "species", "race") started to dominate the intellectual scene" in the late 19th-century Qing dynasty and completed the "transition from cultural exclusiveness to racial exclusiveness in modern China" in the 1920s.

Following the overthrow of the Qing, Sun Yat-sen allegedly went to the grave of Zhu Yuanzhang and told him that the Huaxia had been restored and the barbarians overthrown. However, after the Republic of China revolution, Sun also advocated that all ethnic groups in China were part of the Chinese family.

People's Republic of China
The PRC did not abide by the concept of the Hua-Yi distinction and recognised the Liao, Jin, Yuan, and Qing as legitimate dynasties. Initially, the Communist Party condemned all Chinese dynasties as "feudal."

Japan
In ancient times Japan seems to have had a vassal relationship with China. In 57 Emperor Guangwu of Han sent an imperial seal which mentions "King of Japan" (漢委奴國王) and in 239 Emperor Ming of Cao Wei sent a seal for "pro-Wei King of Japan" (親魏倭王) to Japan.

However, in 607 Prince Shōtoku of Japan stated its perspective of being independent and equal to China in a diplomatic letter by referring to the Japanese ruler as the Son of Heaven, another title for the Chinese emperor (日出處天子致書日沒處天子無恙云云; "The Son of Heaven of where the sun rises is writing to the Son of Heaven of where the sun sets"). It was taken as an insult by the Chinese emperor of the time, Emperor Yang of Sui, since Heaven is only supposed to have one eldest Son.

Confucianism was introduced into Japan about at the same time as Buddhism, but it was not encouraged to be spread as much as Buddhism was.

Some Japanese philosophers, like the neo-Confucianists Yamaga Sokō and Aizawa Seishisai claimed that Japan was the "Central State" (中國; Chūgoku) instead of China.

Korea
After the Qing dynasty succeeded the Ming dynasty in China proper in 1644, the Korean Joseon dynasty began to refer to itself as "Sojunghwa" ("Little China"). As the Joseon supported the Ming, they were reported to have extended a friendliness to the Ming that they did not display to the Qing dynasty.

This sentiment was in large part due to the fact that the Jurchens were descended from the Mohe people, who were once subjects of Goguryeo and Balhae. In addition, the Jurchens were widely recognised as "barbarians", as Jurchen tribes have been raiding and pillaging the northern border regions of Korean Goryeo and Joseon kingdoms for centuries. This sentiment did not disappear even after Qing completed sinicisation.

Because Korea had been closely tied to Han Chinese, "barbarianism ruling China" became a major issue for discussion there.

As the Ming dynasty fell, Korea was worried about its own security. This was due to previous instances in which Ming China aided Korea such as in the Japanese invasions of Korea (1592–98). Long after the establishment of the Qing dynasty, the Joseon ruling elite and even the Joseon government continued to use the Chongzhen Emperor's era name of the last Ming emperor. In private they referred to the Manchu emperors of Qing China as the "barbarian ruler" and Qing ambassadors as "barbarian ambassadors". These feelings could not be expressed as the "barbarians" held great power over Korea following their successful invasion in the Later Jin invasion of Joseon in 1627 and the Qing invasion of Joseon of 1637.

Over time the Qing government exerted more power over Joseon Korea. This would eventually turn Korea into a hermit kingdom to limit foreign influence.

Ryūkyū
The Ryukyu Kingdom was heavily influenced by Chinese culture, taking language, architecture, and court practices from China. It also paid annual tribute to first the Ming and later Qing courts from 1374 until 1874.

Vietnam
Vietnamese dynasties competed for primacy, adopting the same descriptive term, "Central State" (中國; Trung Quốc), while the Chinese were "outsiders". For example, the Gia Long Emperor used Trung Quốc as a name for Vietnam in 1805. Cambodia was regularly called Cao Man (高蛮), the country of "upper barbarians".

In the 1800s, Nguyễn rulers such as the Minh Mạng Emperor claimed the legacy of Confucianism and China's Han dynasty for Vietnam. Vietnamese called themselves as Hán dân (漢民) and Hán nhân (漢人), while they referred to ethnic Chinese as Thanh nhân (清人) or Đường nhân (唐人). For example, Emperor Gia Long said Hán di hữu hạn (漢夷有限, "the Vietnamese and the barbarians must have clear borders") when differentiating between Khmer and Vietnamese.

As Vietnam conquered territory from the Khmer and Lao kingdoms and various tribes on the Central Highlands such as the Jarai and the Mạ, Emperor Minh Mạng implemented an acculturation integration policy directed at these peoples. He declared, "We must hope that their barbarian habits will be subconsciously dissipated, and that they will daily become more infected by Han [Sino-Vietnamese] customs."

Clothing was also affected by Nguyễn policies. Lord Nguyễn Phúc Khoát ordered traditional wrapped-skirt and cross-collar clothing which is very popular in Sinosphere to be replaced by Qing and Ming-style clothing although isolated hamlets in northern Vietnam continued to wear skirts until the 1920s. The ao dai was created when tucks, which were close fitting and compact, were added to this Chinese style in the 1920s.

Up to 1812, the 1644 Ming Datong calendar was used by the Nguyễn in Vietnam.