In 428, Daxi and Qiudun Dui, trying to capture Helian Chang, instead became trapped by Helian Chang in the city of Anding (安定, in modern Pingliang, Gansu). However, Daxi's subordinates Yuchi Juan (尉遲眷) and Anchi Jia (安遲頡) made a surprise attack and captured Helian Chang. Helian Ding took over as the emperor of Xia. Meanwhile, Emperor Taiwu treated Helian Chang as an honored guest, supplying Helian Chang with the same supplies that he himself used, and he married his sister Princess to Helian Chang and created him the Duke of Kuaiji; he also rewarded Yuchi and Anchi greatly and created them dukes. Subsequently, Daxi, humiliated that his subordinates captured Helian Chang and he himself appeared helpless, aggressively pursued Helian Ding, but instead was defeated and captured by Helian Ding. In fear, Qiudun and Tuoba Li (拓拔禮) the Prince of Gaoliang abandoned Chang'an as well and fled to Puban, allowing Xia to recapture Chang'an. In anger, although Qiudun had been a high-level official for him since the days that he was crown prince, he had Anchi execute Qiudun and take over his position. For the time being, Emperor Taiwu left Helian Ding alone, while preparing an assault on Rouran instead, since Rouran had been harassing the northern border region.