# Western Qin

The Western Qin (Chinese: 西秦; pinyin: Xī Qín; 385–400, 409–431) was a dynastic state of China ruled by the Qifu clan of Xianbei ethnicity during the era of Sixteen Kingdoms. All rulers of the Western Qin declared themselves "wang", translatable as either "king" or "prince." They ruled an area corresponding to modern-day southwestern Gansu in Northwest China, also known as the Longxi region, along with parts of northeastern Qinghai in the later years. The state went by various different names as their rulers opted for lesser peerages while they were acting as vassals, and they were only known as "Qin" (秦) from 395 to 400, from 409 to 411 and from 414 to 431.
The Western Qin was briefly discontinued in 400 after Qifu Gangui surrendered to the Later Qin before it was revived in 409. They also frequently shifted their capital from time to time, with Fuhan (枹罕, in modern Linxia, Gansu) as their longest-serving capital at 18 years without interruption. They are given the prefix of "Western" in historiography to distinguish them with the Former Qin and Later Qin as they were situated to the west of the two states.

## History
### Background

The Qifu tribe was a western branch of Xianbei that resettled around the Longxi region during the beginning of the Western Jin dynasty around 265. Their ancestor was Rufu (如弗), who led the Qifu and three other tribes, Siyin (斯引), Chulian (出連) and Chilu (叱盧) from the north of the Gobi Desert to move south to the Yin Mountains. It is believed that the Qifu had strong connections to the Gaoche people (also known as Dingling); the Chilu were also known as the Tulu (吐盧), one of the twelves surnames of the Gaoche, and during the Western Qin period, there were several officials who had the Dingling surnames of Zhai (翟), Wuyin (屋引), Yizhan (乙旃) and Chilu. The name "Qifu" (乞伏) may have even come from the Gaoche surname, "Qifuli" (泣伏利).
The Qifu and their followers eventually left the Yin Mountains to live north of the Hetao region. Under Qifu Youlin, they initially moved westward to an area known as Xiayuan (夏緣) and later settled along the Gaoping River (高平川; in modern Guyuan, Ningxia), where they annexed the Xianbei Lujie (鹿結) tribe who had a following of 70,000 people. The Qifu continued to live a nomadic lifestyle within the Chinese interior, frequently shifting their base before finally settling at Mount Dujian (度堅山; in modern Jingyuan County, Gansu) under Qifu Sifan. In 371, Sifan submitted to the Di-led Former Qin dynasty, and he was given control over the Yongshi River (勇士川; in modern Lanzhou, Gansu) after helping them defeat a Xianbei revolt in 373.
After Sifan died in 376, his son, Qifu Guoren succeeded him. In 383, Guoren was meant to serve in Former Qin’s campaign against the Eastern Jin, but when his uncle, Qifu Butui (乞伏步頹) rebelled in the Longxi, he was sent to quell the rebellion instead. However, believing that Qin’s fall was eminent, Guoren joined Butui and declared his intention of creating his own state. Surely enough, Qin suffered a devastating defeat at the Battle of Fei River later that year, sending the state into a rapid decline. Guoren then mustered the local tribes and raised an army of around 100,000.

### Early rule

After the Former Qin ruler, Fu Jian was killed in 385, Guoren claimed the title of Grand Chanyu, introduced a new reign era and built his capital city around Yongshi. This is often seen as the beginning of the Western Qin dynasty, but at this point, the Qifu had not yet named their state "Qin", and in 387, they became a vassal to Former Qin after Guoren accepted their title of Prince of Yuanchuan. Guoren spent his reign subjugating neighbouring tribes before dying in 388. As Guoren's son, Qifu Gongfu (乞伏公府), was too young, his brother, Qifu Gangui was acclaimed the new leader.
After ascending, Gangui shifted his capital to Jincheng (金城; in modern Yuzhong County, Gansu). He expanded his power by continuing to campaign against the tribes and receiving tributes from the Tuyuhun, but in 391, he first came into conflict with the Later Liang in the Hexi. In 394, Former Qin was decisively defeated by the Later Qin, and their ruler, Fu Deng was captured in battle. Although his son, Fu Chong succeeded him, Gangui took the opportunity to seize Former Qin's remaining territory. The Qifu occupied the whole of Longxi after killing Fu Chong and the Chouchi ruler, Yang Ding in battle, bringing a formal end to Former Qin.
In 395, Gangui claimed the title of King of Qin. Historiographers refer to his state as the Western Qin to distinguish it with the Former Qin and Later Qin. While he still kept the Grand Chanyu title and its auxiliary offices, he established a governmental structure that was similar to the Eastern Han and Cao Wei dynasties. Conflict with the Later Liang continued, which led to Gangui moving the capital to Xicheng (西城, in modern Baiyin, Gansu) and briefly submitting to Liang. The threat dissipated after Western Qin repelled a Later Liang invasion in 397, leading to rebellions in Liang by the Tufa and Juqu tribes, who founded the Southern Liang and Northern Liang respectively.
In 400, Gangui moved the capital to Yuanchuan (苑川, in modern Baiyin, Gansu), but shortly after, he faced a major invasion from Later Qin. He was heavily defeated and so decided to surrender to Southern Liang, ending Western Qin for a time. However, he later fled to Later Qin, where he was made a general and allowed him to hold his former territory.

### Restoration and final defeat

By 409, the Later Qin was facing mounting defeats on the battlefield along with the Helian Xia and Southern Liang breaking away. That year, Qifu Gangui restored the Western Qin at Mount Dujian, once again calling himself the King of Qin. He soon returned the capital to Yuanchuan in 410 and captured several Later Qin commanderies. Due to pressure from the Xia and Eastern Jin, Later Qin could only convince Gangui to remain as a nominal vassal by appointing him the King of Henan. Gangui then campaigned against Southern Liang and the Tuyuhun. In 412, he shifted the capital to Tanjiao (譚郊, in modern Linxia Hui Autonomous Prefecture, Gansu) before he was assassinated by Qifu Gongfu.
Gangui's son, Qifu Chipan quickly defeated Gongfu and took the throne. Chipan moved the capital to Fuhan (枹罕, in modern Linxia, Gansu), where it would remain for many years. Evident from his reign was the Western Qin's endorsement of Buddhism, as the Bingling Temple was first built under him. In 414, he conquered the Southern Liang and restored the King of Qin title, but Western Qin was now in contact with Northern Liang, and the two sides fought with each other on multiple occasions. He also launched several campaigns against the Tuyuhun and other tribes to broaden his state's influence. When the Eastern Jin commander, Liu Yu conquered Later Qin in 417, Chipan submitted to Jin as a vassal. Liu Yu appointed him Duke of Henan and left his territory unscathed, but in 418, the Helian Xia conquered the Guanzhong region from Jin, and Western Qin had a new threat from the east.
The situation worsened for Western Qin in 421 as the Northern Liang vanquished the Western Liang, freeing up their western frontiers and allowing them to focus on Qin. Chipan allied himself with the Northern Wei and tried to get them to attack the Xia, but he continued to suffer losses to Xia and Liang, with his worst defeat coming in 426. Internally, Western Qin was also struggling with rebellions by their Tuyuhun and Qiang subjects. Chipan died in 428, leaving behind his son and successor, Qifu Mumo an inherently dire situation.
In 429, due to pressure from Liang, Mumo was forced to move his capital to Dinglian (定連; in modern Linxia, Gansu). In 430, Mumo offered his surrender to Northern Wei, but on his way to join Wei at Shanggui, the Xia emperor, Helian Ding intercepted him and forced him to stop at Nan'an (南安; southeast of modern Longxi County, Gansu). Meanwhile, the rest of Qin's territory was conquered by the Tuyuhun, leaving Mumo with only a lone city. In 431, Helian Ding, in a last-ditch effort to expand westward, attacked Nan'an and forced Mumo to surrender, thus ending the Western Qin dynasty. Mumo and 500 of his clan members were all executed by Xia.

## Rulers of the Western Qin

| Temple name | Posthumous name | Personal name | Durations of reign | Era names |
| Liezu | Xuanlie | Qifu Guoren | 385–388 | Jianyi (建義) 385–388 |
| Gaozu | Wuyuan | Qifu Qiangui | 388–400, 409–412 | Taichu (太初) 388–400 Gengshi (更始) 409–412 |
| Taizu | Wenzhao | Qifu Chipan | 412–428 | Yongkang (永康) 412–419 Jianhong (建弘) 420–428 |
| – | – | Qifu Mumo | 428–431 | Yonghong (永弘) 428–431 |

## The family tree of Western Qin rulers

Western Qin :
| | | | | | | | | | | Qifu Sifan 乞伏司繁 (d. 376) | Qifu Sifan 乞伏司繁 (d. 376) | Qifu Sifan 乞伏司繁 (d. 376) | Qifu Sifan 乞伏司繁 (d. 376) |
| | | | | | | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Guoren 乞伏国仁 (d. 388) Xuanlie 宣烈 r. 385–388 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 | Qifu Qiangui 乞伏乾归 (d. 412) Wuyuan 武元 r. 388–400; 409–412 |
| Qifu Gongfu 乞伏公府 | Qifu Gongfu 乞伏公府 | Qifu Gongfu 乞伏公府 | Qifu Gongfu 乞伏公府 | Qifu Gongfu 乞伏公府 | Qifu Gongfu 乞伏公府 | Qifu Achai 乞伏阿柴 | Qifu Achai 乞伏阿柴 | Qifu Achai 乞伏阿柴 | Qifu Achai 乞伏阿柴 | Qifu Achai 乞伏阿柴 | Qifu Achai 乞伏阿柴 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 | Qifu Chipan 乞伏熾磐 (d. 428) Wenzhao 文昭 r. 412–428 |
| | | | | | | Qifu Yuanji 乞伏元基 | Qifu Yuanji 乞伏元基 | Qifu Yuanji 乞伏元基 | Qifu Yuanji 乞伏元基 | Qifu Yuanji 乞伏元基 | Qifu Yuanji 乞伏元基 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 | Qifu Mumo 乞伏暮末 d. 431; r. 428–431 |
| | | | | | | | | | | | | Qifu Wanzai 乞伏万载 | Qifu Wanzai 乞伏万载 | Qifu Wanzai 乞伏万载 | Qifu Wanzai 乞伏万载 | Qifu Wanzai 乞伏万载 | Qifu Wanzai 乞伏万载 |

## Language

Shimunek classifies the language of the Qifu as a "Serbi" (i.e., para-Mongolic) language. Shimunek's "Serbi" linguistic branch also includes Taghbach, Tuyuhun, and Khitan.