# Former Liang

The Former Liang (Chinese: 前涼; pinyin: Qián Liáng; 301–376) was a dynastic state, and one of the Sixteen Kingdoms, in Chinese history. It was founded by Zhang Shi of the Han Chinese Zhang family. Its territories included present-day Gansu and parts of Ningxia, Shaanxi, Qinghai and Xinjiang.
All rulers of the Former Liang remained largely titularly under the court of the Eastern Jin dynasty as the Duke of Xiping except Zhang Zuo who proclaimed himself emperor (or king). However, at times the other Former Liang rulers also used the king title when imposed on them when they were forced to submit to their powerful neighbour states—initially the Former Zhao, then the Later Zhao, and finally the Former Qin. As the early rulers did not explicitly declare their independence, the official year of Former Liang's establishment is up to interpretation, but no earlier than 301, the year when Zhang Gui was appointed Inspector of Liang province. Historiographers gave the state the prefix of "Former" to distinguish it from the Di-led Later Liang that came after them, along with the other Liang states of the Sixteen Kingdoms, Southern Liang, Northern Liang and Western Liang.

## History
### Background

The founding of the Former Liang can be traced back to Zhang Gui. He was a Han Chinese official under the Western Jin dynasty who claimed descent from Zhang Er, the King of Changsha during Emperor Gaozu of Han’s era. Zhang Gui was appointed as provincial inspector by the imperial court in 301.
Along with his two sons, Zhang Mao and Zhang Shi, he made Guzang (姑臧, in modern Wuwei, Gansu) his main base and worked closely with the local population to ensure the dynastic rule of his family. Due to the stability in the area, Former Liang became a refuge for those fleeing the chaos of the heartland. Zhang Gui also developed the region by promoting agriculture and establishing new schools. Despite his influence in Liang, Zhang Gui never declared independence and remained a Jin official up to his death in 314. Likewise, his successors for the most part nominally retained their status as Jin officials, maintaining their legitimacy by maintaining ties with the Jin court. As a result of the migration of refugees from the collapsing Western Jin, there was an influx of literati who fled to Former Liang rather than the Jin court-in-exile in the south, which resulted in the Former Liang becoming a cultural center of North China.

### Early years

Zhang Gui aided the Western Jin in its war against the Xiongnu-led Han dynasty (renamed to Former Zhao in 319), as did his son and successor Zhang Shi. After Emperor Min of Jin’s capture and execution, Zhang Shi sent envoys to the prince, Sima Rui at Jiankang in the south, urging him to take the throne. The dynasty was re-established as the Eastern Jin in 318, but despite his endorsement, Zhang Shi refused to adopt Sima Rui’s new reign era. Instead, he continued to use Emperor Min’s reign era, Jianxing (建興) within his territory, a practice that was upheld by most of his successors. Zhang Shi is considered the de facto founder of the Former Liang, establishing Guzang as its capital in 317.
After Zhang Shi's assassination in 320, his brother, Zhang Mao took power. He came into conflict with the Former Zhao, who were expanding westward to compete with their rival Later Zhao. In 323, Zhang Mao submitted to the Former Zhao, receiving the title of King of Liang and the nine bestowments, while internally retaining his Jin title of Duke of Xiping.

### Reign of Zhang Jun

The Former Liang reached its peak under Zhang Jun, who succeeded his uncle Zhang Mao in 324. After the Later Zhao conquered Former Zhao in 329, he rejected Later Zhao's authority at first, but was eventually pressured into submission. Regardless, in 335 his forces marched across the sands and expanded his territory, forcing several oasis states in the Western Regions like Kucha to submit to him. In the mid-fourth century, it is believed that Former Liang could have maintained control over much of modern day Gansu and Xinjiang, as well as portions of Qinghai and Ningxia. Zhang Jun also established ties with the Cheng-Han dynasty in southwestern China.
Under him, the Former Liang began to use the ranks and titles of the imperial court, as well as imitating the flag, trappings, and carriage of the Emperor roughly twenty-one years into his reign. His state's immense wealth was exemplified by his extravagant building projects, most notably the five palaces he built south of Guzang. In 345, he proclaimed himself Acting Prince of Liang, all while still recognizing Jin as his overlord.

### Internal turmoil and decline

Zhang Jun died in 346 and was succeeded by his son Zhang Chonghua. Relations between Former Liang and Later Zhao had soured near the end of Zhang Jun's reign, and shortly after Chonghua ascended, Zhao launched an invasion on Liang. The Liang general, Xie Ai initially repelled the invaders, but they still lost their territory south of the Yellow River. During and after the Later Zhao collapse in the early 350s, Chonghua attempted to reclaim lost land and expand eastward, but his efforts were frustrated by the new and rising Former Qin dynasty. His death in 353 began a lengthy period of internal turmoil within the state as he left behind his 10-year-old son Zhang Yaoling on the throne.
Shortly after ascending, Yaoling was deposed by his uncle and regent, Zhang Zuo. In 354, Zhang Zuo declared himself emperor (or king), being the only Former Liang ruler to fully reject Jin's suzerainty. In 355, a distant relative, Zhang Guan, overthrew him and installed Zhang Chonghua's five-year-old son, Zhang Xuanjing, to take the throne. Zhang Guan acted as regent but later considered usurping the throne before he was killed by Song Hun. Song Hun and his brother, Song Cheng, were members of the prominent Song clan of Dunhuang and served as Xuanjing's regents in succession, during which they discarded Zhang Zuo's imperial title. In 361, Song Cheng was assassinated by the general, Zhang Yong, who soon suffered the same fate at the hands of his co-regent and Xuanjing's uncle, Zhang Tianxi. Tianxi was the last of Xuanjing's regents, as in 363, he deposed his nephew and assumed power for himself.

### Fall and aftermath

Infighting within the Former Liang left the state severely weakened. Several pro-Eastern Jin rebellions broke out in 356 and they once more lost all their territory south of the Yellow River. Faced with pressure from the Former Qin, they were also forced to submit to them as vassals. During his regency and reign, Zhang Tianxi finally discarded the Jianxing reign era and adopted the Eastern Jin's reign eras, thus fully recognizing their sovereignty. Later, he attempted to get the Jin commander, Huan Wen, to coordinate a campaign with him against Qin but was ignored. In 376, Former Qin invaded Former Liang, prompting Tianxi to surrender and ending the state.
Zhang Tianxi served as a mid-level official under the Qin, but in the aftermath of the Battle of Fei River in 383, he managed to escape to the Eastern Jin. He became a Jin official and was restored to his family's title of Duke of Xiping before dying in 406. His son, Zhang Dayu attempted to restore his family's state in 386, but was killed in 387 by Lü Guang, the founder of Later Liang.
Despite the chaos that plagued Former Liang in its later years, it also saw the emergence of the Mogao Caves, as these Buddhist grottoes are widely believed to have been first constructed by the monk, Le Zun (樂尊) near Dunhuang in 366.

## Rulers of the Former Liang

| Posthumous names | Family names and given name | Durations of reigns | Era names and their according durations |
| Wu | Zhang Gui | 301–314 | |
| Ming | Zhang Shi | 314–320 | Jianxing 建興 318–320 |
| Cheng | Zhang Mao | 320–324 | Jianxing 建興 or Yongyuan 永元 320–324 |
| Zhongcheng | Zhang Jun | 324–346 | Jianxing 建興 or Taiyuan 太元 324–346 |
| Huan | Zhang Chonghua | 346–353 | Jianxing 建興 or Yongle 永樂 346–353 |
| – | Zhang Yaoling | 353 | Jianxing 建興 353 |
| King Wei | Zhang Zuo | 353–355 | Heping 和平 354–355 |
| Jingdao | Zhang Xuanjing | 355–363 | Jianxing 建興 355–361 Shengping 升平 361–363 |
| Dao | Zhang Tianxi | 364–376 | Shengping 升平 363–372 Xian'an 咸安 372–376 |

## Rulers family tree

Former Liang rulers family tree :
| | | | | | | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) | Zhang Gui 张轨 (255–314) Wǔwáng 武王 (r. 301–314) |
| | | | | | | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Shi 张寔 (d. 320) Míngwáng 明王 / Zhāowáng 昭王 (r. 314–320) | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 | Zhang Mao 張茂 (276–324) Chenglie 成烈 / Cheng 成 r. (320–)323–324 |
| | | | | | | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | Zhang Jun 張駿 (307–346) Wen 文 / Zhongcheng 忠成 r. 324–346 | | | | | | |
| Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Zuo 张祚 (d. 355) Wei 威 (r. 353–355) | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Chonghua 張重華 (327–353) Jinglie 敬烈 / Huan 桓 r. 346–353 | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) | Zhang Tianxi 張天錫 (346–406) Dao 悼 (r. 363–376) |
| Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Yaoling 張曜靈 (344–355) Ai 哀 (r. 353–355) | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Xuanjing 張玄靖 (350–363) Jingdao 敬悼 / Chong 沖 r. 355–363 | Zhang Dayu 张大豫 d. 387; r. 386–387 | Zhang Dayu 张大豫 d. 387; r. 386–387 | Zhang Dayu 张大豫 d. 387; r. 386–387 | Zhang Dayu 张大豫 d. 387; r. 386–387 | Zhang Dayu 张大豫 d. 387; r. 386–387 | Zhang Dayu 张大豫 d. 387; r. 386–387 |