several of the tarim basin oasis states switched their allegiance from the tang dynasty to the western turks. the oasis states kashgar and khotan surrendered to the chinese in 632, as did the kingdom of yarkand in 635. tang military campaigns expanded further west against the remaining kingdoms of the tarim basin in southern xinjiang beginning in 640. the king of gaochang refused to submit to the tang dynasty as a suzerain. in 638, emperor taizong ordered a campaign led by general hou junji to invade gaochang. tang troops arrived in 640 and annexed the kingdom. a western turk army, sent to support gaochang, retreated as the tang forces approached.