In 717 AD, the Umayyad Arabs along with their Turgesh and Tibetan allies besieged two cities in the Aksu region which was under Chinese protection. The commander of China's four Anxi garrisons in Central Asia, Tang Jiahui, sent two armies: one composed of Tang irregular troops led by Jiahui himself and other composed of Karluk horsemen led by Ashina Xin.[1] In the resulting battle, the Arab army was heavily defeated and forced to retreat. Many Arab troops were taken prisoner but were subsequently released after the Caliphate paid a ransom in gold for their release.