Tang China was a powerful and culturally rich multicultural Empire with satellite states in Afghanistan and strong centralized control and friendly relations with neighbours (tributaries).
During this time period, countries like Japan and Korea developed their classical culture by almost completely copying Tang Chinese Culture. Multiple Zen masters and prominent Foreign Buddhists of this era were all trained/or successors to schools in China. Kyoto for example, is a smaller replica of Chang’an, Matcha was actually the method of green tea preparation enjoyed by the Tang Chinese (China later developed loose tea leaf instead of powdered tea). Sino-Japanese and Sino-Korean were actual languages influenced by Middle Chinese.
The Capital of Chang’an had a population of almost a million people. Half of those people were foreigners. Many of them multi-generational, growing up in China, taking the Civil Service Exams, becoming Officials and Aristocrats, marrying the locals, etc. Many were slaves as well.
Something like 14% of Tang China’s Prime Ministers were foreigners (yes, actual foreigners).
The surviving Persian Royal Familiy (escaping the Rashidun Caliphate’s Conquest of Iran) married into the Tang Royal Family and were given the royal surname of “Li”. The Last Prince of Persia, Peroz III, was actually the Commander of “Area Command of Persia” in Tang Afghanistan.
However, a series of disasters happened during the height of the Empire and caused a dramatic downfall.
The Sequence of Decline
1) The half-Sogdian (Persian) General An Lushan lead a rebellion against the Empire and occupied the secondary Capital of Luoyang.
2) Military betrayal by the Uighurs (another Turkic Persian group, at this time mostly Zoroastrians, not Muslims), who helped retook Luoyang from the rebels, but refused to leave until they were paid huge monetary rewards. AND the Tibetan Empire took this opportunity to invade and steal Chinese Territory.
3) The perceived betrayal by foreigners lead to a rise of xenophobic sentiments in the normally very multicultural Tang Culture.
4) The xenophobia culminated in the Great Anti-Buddhist Persecution of 845 AD, where Emperor Wuzhong, acting under both financial interest and religious favouritism towards Taoism, destroyed 4,600 Buddhist temples, 40,000 shrines, and removed 260,500 monks and nuns from the monasteries. He forced monks and nuns to return to lay life, and expelled foreign monks and nuns back to their home countries. Because he classified Nestorian Christianity, Manichaeism, Zoroastrianism as “Foreign forms of Buddhism” (despite the fact Buddhism was already foreign), those religions were persecuted as well, and eventually became extinct in China. Because they were also the last bastions of those religion in the world, Manichaeism and Zoroastrianism was practically finished globally. Surviving Manichaeans did manage to hide themselves as Buddhists and Taoist until well into the present day.
5) Emperor Wuzhong’s successor immediately repealed the persecution and tried to rebuild the religious institutions, but the damage was already done. Most of the persecuted religions would never recover. Islam survived, mostly because it was new, and because the Arab traders of the time were focused on trade, not religious propagation.
6) Xenophobia remained rampant, and several Peasant Rebellions were launched on a partially racist platform (mostly anti-government, tbh, I am not sure where I heard the xenophobic platform of the rebel armies from, but it was probably widespread at this time). These peasant armies eventually sacked both Chang’an and Luoyang. The Arab historian Abu Zayd Hasan of Siraf wrote that when Huang Chao (the rebel leader) captured Guang Prefecture, his army killed 120,000 to 200,000 foreigners.
7) Surviving ancient Chinese noble families (some who can trace their lineage to the ancient Zhou, Shang, and Xia Dynasties) were almost rendered extinct, forcing survivors to flee southwards.
8) The Succeeding Song Dynasty, after they reunited all of China from the pretender dynasties, was SINOCENTRIC. Confucianism (a native Chinese religion) became the state religion; women, who enjoyed liberties close to or greater than our modern world today during the Tang Dynasties were shackled under tighter conservative expectations, and foreigners were never again as welcome in China.