in summer 441, juqu wuhui's cousin juqu tang'er (沮渠唐兒), who was defending dunhuang, rebelled. juqu wuhui left another cousin, juqu tianzhou (沮渠天周), in charge at jiuquan, while personally attacking juqu tang'er, and juqu tang'er was killed in battle. however, as he did so, northern wei, still viewing him with suspicion, sent its general daxi juan (達奚眷) to besiege jiuquan. with food supplies running out quickly, by winter 441, jiuquan fell to northern wei forces, and juqu tianzhou was killed. juqu wuhui himself lacked food at dunhuang, and he feared northern wei's next attack, and he therefore considered reestablishing his state in xiyu. he first sent his brother juqu anzhou against shanshan, but initially juqu anzhou was repelled. however, in 442, juqu wuhui abandoned dunhuang and joined juqu anzhou, and the king of shanshan, in fear, fled, and juqu wuhui, half of whose soldiers died of thirst on the way between dunhuang and shanshan, took shanshan.