In 717 the Tibetans (according to an 11th-century Chinese history) joined with the Turkic Türgish to attack
Kashgar. In 720 Tibetan troops took the Uighur principality of 'Bug-cor in the Dunhuang oasis. The
Tang Annals report that in 722 the Tibetans attacked Gilgit (Tib. Bru-sha) which could imply that they had already gained control of
Ladakh and
Baltistan, in order to pass through. However, the Tibetans could have gone through Taglokan region and attacked Gilgit without needing to take Baltistan and Ladakh, as suggested by the paths and trade routes through Shaksgham and through Baltistan. In 727 the king left to take control of the government of the 'Azha in hand. He then seized the important Chinese fortress of Kva-cu or Guazhou at (
Anxi), to the southeast of
Dunhuang, which contained supplies for all the Chinese-dominated territories as far as the Western Turks (Dru-gu) to the north and the
Tazig (Arabs) to the west, and all this wealth fell into the hands of the Tibetans so that even ordinary Tibetans had fine Chinese silks to dress up in. However, the Chinese managed to drive the Tibetans away in 728, after a siege of eighty-days. In 724, according to a Chinese encyclopedia of 1013, the Chinese princess, Jincheng secretly wrote to the ruler of
Kashmir asking for asylum, but apparently nothing came of this. In 736 Tibet again attacked Bru-sha (Gilgit), and the ruler came to Tibet to pay homage. Later that year the Chinese also attacked Bru-sha, but in 740 the Tibetan princess Khri-ma-lod married the ruler of Bru-sha. In 738 the 'Nine Loops of the Huang Ho', which had been given to Tibet as part of a dowry, were retaken by the Chinese. In 740, the Chinese also regained control of the key fortress at Anrong, just north of
Chengdu, which the Tibetans had held for over sixty years. In 742 the Chinese also managed to recapture the formidable fortress of Shipu, near the border in the Red Hills. In 751 The Tibetans again sent troops north of the Jaxartes River (
Syr Darya) and helped the
Arabs and
Qarluq Turks defeat the Chinese at
Talas. This decisive battle ended Tang's power in the west. ==Relations with Nepal==