The empire of 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 funded the empire, and Li Shi Min, the Tai Zong Emperor who unified the whole 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 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 Enlightened Administration in Kaiyuan Reign under Emperor Xuan Zong by Emperor Xuan Zong. The country again boasted of strong capacity of 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 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 Tang Empire. Zhu wen, one of leaders of that upring, later surrendered to the emperor of then Tang regime and finally overthrew it by crowning himself the new emperor. He funded the first dynasty in the period of Five Dynasties and Ten States-Late Liang Dynasty.