The rapid decline after the middle Tang Dynasty is closely related to its ethnic policy.
There were many non-Han ministers in the Tang Dynasty, so the Tang Dynasty did not pay attention to the distinction between China people and foreigners. In the middle period, due to the court struggle, most of the military power in the buffer region was in the hands of the Hu people, so the Anshi rebellion broke out.
The direct consequence of the An-Shi Rebellion was the decline and division of the Tang Dynasty, with a large territory in the west occupied by Tubo and a large territory in the east divided by the buffer region. Eventually led to the demise of the Tang Dynasty.
The indirect influence of the Anshi Rebellion was to destroy the environment, economy and culture in northern China, to shift the cultural center of China to the south, and to unbalance the culture of China.
Thank you ~ ~