In 424, for reasons lost to history, Helian Bobo decided to depose Crown Prince Gui and appoint another son, Helian Lun (赫連倫) the Duke of Jiuquan, a crown prince. Upon hearing this news, Helian Gui commanded his troops north from Chang'an and attacked Helian Lun. Their forces met at Gaoping, and Helian Gui defeated and killed Helian Lun. However, Helian Lun's brother Helian Chang then made a surprise attack on Helian Gui, killing him and seizing his troops, leading them back to Tongwan. Helian Bobo was pleased and created Helian Chang crown prince.