乞伏乾帰
In summer 400, Later Qin's general, Yao Xing's uncle Yao Shuode (姚碩德) launched a major attack against Western Qin. Initially, Qifu Gangui was successful in cutting off Yao Shuode's supply line, but Yao Xing then personally came to Yao Shuode's aid. Qifu Gangui divided his army to try to ascertain Later Qin's intentions, but the armies lost communication in the fog, and Later Qin attacked them and greatly defeated them, taking nearly the entire Western Qin army captive. Yao Xing advanced to Fuhan (枹罕, in modern Linxia Hui Autonomous Prefecture, Gansu), forcing Qifu Gangui to flee back to Jincheng. With his army lost, however, Qifu Gangui concluded that he could not sustain a state any more, and instructed his officials to surrender to Later Qin, while he himself surrendered to Southern Liang's prince Tufa Lilugu, who welcomed him as an honored guest. Tufa Lilugu's brother Tufa Juyan (禿髮俱延) suspected Qifu Gangui's intentions, and suggested that Tufa Lilugu exile him to the Yifu (乙弗) tribe (probably west of the Qinghai Lake), a suggestion that Tufa Lilugu rejected. However, worried that Qifu Gangui would try to reestablish his state, he sent an army to watch over him. Qifu Gangui, fearing that he would be executed, then regained trust from Tufa Lilugu by sending Qifu Chipan, his brothers, and their mother to the Southern Liang capital Xiping as hostages. He himself, however, as soon as the Southern Liang guard was down, fled to Fuhan and surrendered to Later Qin.