 The Tang only retained a military foothold in Beiting.Tang rule over Xinjiang and Central Asia was threatened by Tibetan expansion into the Southern Tarim.After defeating the Tang in 670, the Tang retreated eastwards "and was in full flight from its empire in Central Asia."