Western Liang (Sixteen Kingdoms)

Liang, known in historiography as the  Western Liang (400–421), was a dynastic state of China listed as one of the Sixteen Kingdoms. The Western Liang was founded by the Li family of Han descent. The founder of the Tang dynasty, Li Yuan (Emperor Gaozu), traced his patrilineal ancestry to the Western Liang rulers and traced the ancestry of the Western Liang rulers to Li Guang and Laozi in the paternal line. The ruling Li clan of the Western Liang was known as the Longxi Li lineage (隴西李氏).

All of the Rulers declared as gōngs (公) which is translated to Dukes.

Background
Western Liang's founder, Li Gao was from the Li clan of Longxi, a prominent Han Chinese family that claimed descent from figures such as Laozi, Li Xìn and Li Guang. Under the Western Jin and Former Liang dynasties, his family members served as administrators in the Hexi Corridor. In 397, the Administrator of Jiankang (建康, in modern Zhangye, Gansu), Duan Ye, with support of the Lushuihu Juqu tribe, broke away from the Later Liang and founded the Northern Liang. Li Gao served as a magistrate under Northern Liang, an in 400, at the recommendation of the local Han elites, he was made the Administrator of Dunhuang.

Reign of Li Gao
That same year, the Administrator of Jinchang, Tang Yao (唐瑤) rebelled in his commandery and acclaimed Li Gao as his leader, offering him the title of Duke of Liang. Li Gao accepted him, and he declared a general amnesty and changed the era name in his territory. Historiographers refer to his state as Western Liang to distinguish it with the other rival Liang states at the time.

Li Gao's state was backed by local Han Chinese gentry clans, and all the cities west of Yumen Commandery submitted to him. In 401, both Jiuquan and Liangning (陇西郡; northwest of present-day Yumen City, Gansu) commanderies also surrendered to him from Northern Liang. To apply more pressure on the Northern Liang, he moved his capital east to Jiuquan in 405 and allied with the Southern Liang. He also nominally submitted to the Later Qin and sent tributes to Northern Wei.

The Western Liang sought to take control of Liang and Qin provinces, but it was relatively weak compared to its neighbours. Li Gao maintained a stable economy within his state by encouraging agriculture and trade with the Western Regions, along with promoting Confucianism through the establishment of new schools. Like the Former Liang before him, Li Gao considered himself a vassal to the Eastern Jin in the south and sent envoys to have his titles recognized by them. However, due to the distance between the two states, it would not be until Liu Yu's second northern expedition when the Jin formally recognized Western Liang as a vassal. Western Liang also had to defend themselves against the nomadic Rouran and Tuyuhun.

Fall
In 417, Li Gao died and was succeeded by his son, Li Xin, who records describe as a cruel ruler who drained the state's resource with construction projects. Taking advantage of the situation, the Northern Liang intensified their efforts to conquer Western Liang. In 420, Li Xin was enticed into attacking the Northern Liang capital, Guzang (姑臧, in modern Wuwei, Gansu), and fell into a trap. He died in battle, and Northern Liang forces soon captured Jiuquan. His brother, Li Xun succeeded him in Dunhuang and continued to hold out, but the city eventually fell and Li Xun committed suicide in 421, putting an end to Western Liang.

Li Gao's descendants survived the fall of Western Liang, with the Tang dynasty claiming descent from him through Li Xin's son, Li Chong'er (李重耳), who fled to the Liu Song dynasty in the south before returning north to the Northern Wei. For this reason, the Tang posthumously honoured Li Gao as Emperor Xingsheng and refer to him in the Book of Jin by his courtesy name due to naming taboo. Another grandson of Li Gao, Li Bao, was captured by Northern Liang but fled to Yiwu County with his uncle, Tang Qi (唐契), becoming vassals to the Rouran. In 444, Li Bao surrendered and served under Northern Wei, where his son Li Chong became a prominent minister. The famed Tang dynasty poets, Li Bai and Li Shangyin were also both believed to be descendants of Li Gao.