The empire of the Tang Dynasty had existed for 289 years from 618 AD when Tang Dynasty was funded till 907 AD when Emperor Zhu Wen was killed. The whole Tang Dynasty comprised of two stages: the early stage and the late stage. With An-shi Rebellion as the watershed, the early stage enjoyed prosperity while the late stage was in decline. It was Emperor Gao Zu who founded the empire, and Li Shi Min, the Tai Zong Emperor who unified the whole of China through ten years expedition. After the Palace Coup at Xuanwu Gate, Li Shimin ascended the throne and led feudal China into an unprecedented period of prosperity and peace. There was famous Enlightened Administration in Zhenguan Reign under Emperor Tai Zong of the Tang Dynasty during which the politics, economy, and culture had achieved rapid progress and ranked first in the world. The later times witnessed another ruling period of stability and prosperity, and that was the Enlightened Administration in Kaiyuan Reign under Emperor Xuan Zong by Emperor Xuan Zong. The country again boasted of the strong capacity for national defense and the rich spiritual and material life of its people. Unfortunately, there happened An-shi Rebellion, leading Tang Dynasty to degradation.
In the late stage of the Tang Dynasty, the political life of the country went into turmoil. There were fights among eunuchs and divisions of power. Revolts of peasants broke out continuously, including the Uprising led by Huang Chao against the rule of the Tang Empire. Zhu wen, one of the leaders of that uprising, later surrendered to the emperor of the Tang regime and finally overthrew it by crowning himself the new emperor. He founded the first dynasty in the period of the Five Dynasties and Ten States-Late Liang Dynasty.