before, but now as a Later Qin vassal. He quickly put his governmental structure back in place, but now with inferior titles to show submission to Later Qin. Later in 401, Yao Xing sent Qifu Gangui to serve as Yao Shuode's assistant in a major campaign against Later Yang's emperor Lü Long (Lü Guang's nephew), forcing Lü Long's submission. In 402, Qifu Chipan, who had previously made an unsuccessful attempt to escape from Southern Liang to join his father, succeeded in fleeing to Wanchuan. The Southern Liang prince Tufa Rutan sent Qifu Chipan's wife (who might be Tufa Rutan's daughter) and children to join him. In 403, Lü Long decided to give up his state (now consisting of little more than the capital city of Guzang) to Later Qin, ending Later Liang, and Qifu Gangui was one of the generals whom Yao Xing sent to escort Lü Long to Chang'an and to escort his replacement, the Later Qin general Wang Shang (王尚) to Guzang, which was at the point effectively surrounded by Southern Liang and Northern Liang forces. For the next few years, Qifu Gangui appeared to begin to act more independently again. For example, in 405, apparently without Later Qin sanction, he attacked Murong Dahai (慕容大孩), the khan of Tuyuhun, and later in the year he battled fellow Later Qin vassal Yang Sheng (楊盛), the ruler of Chouchi. Around the new year 407, Qifu Gangui went on an official visit to Chang'an. Yao Xing, apprehensive about Qifu Gangui's strength and independence, detained him and made him a minister, giving his command to Qifu Chipan. In 408, with Tufa Rutan, who had previously submitted as a Later Qin vassal, acting independently but yet suffering many internal problems, Yao Xing became resolved to destroy Southern Liang, and Qifu Gangui was one of the generals he sent under the command of his son Yao Bi (姚弼) to try to destroy Southern Liang. However, Yao Bi's campaign resulted in failure, and while Tufa Rutan nominally continued to submit for a time, he soon declared full independence. In 409, Qifu Gangui himself escaped and returned to Wanchuan. Later in the year, he redeclared the Western Qin state with the title Prince of Qin and changed his era name. Second reign After his restoration, Qifu Gangui again created his wife Princess Bian as princess and Qifu Chipan as crown prince, and he temporarily set his