After a vigorous court debate, Emperor Taizong decided to pardon the Göktürk nobles and offered them positions as imperial guards. However, the proposition was ended by a plan for the assassination of the emperor. On May 19, 639 Ashina Jiesheshuai and his tribesmen directly assaulted Emperor Taizong of Tang at Jiucheng Palace (, in present-day Linyou County, Baoji, Shaanxi). However, they did not succeed and fled to the north, but were caught by pursuers near the Wei River and were killed. Ashina Hexiangu was exiled to Lingbiao. After the unsuccessful raid of Ashina Jiesheshuai, on August 13, 639 Taizong installed Qilibi Khan and ordered the settled Turkic people to follow him north of the Yellow River to settle between the Great Wall of China and the Gobi Desert. However, many Göktürk generals still remained loyal in service to the Tang Empire.