The Battle of Aksu (Chinese: 撥換城之戰; Arabic: معركة أقسو) was fought between the Umayyad Caliphate, and their Turgesh and Tibetan allies, against the Tang dynasty, and their Karluk and Western Turk allies. On 15th August, 717 AD, the Umayyads, guided by their Turgesh allies, besieged Aksu (Buat-ɦuɑn) and Uqturpan (Dai-dʑiᴇk-dʑiᴇŋ) in the Aksu region of Xinjiang. Tang troops backed by their protectorates in the region attacked and routed the besieging Umayyads forcing them to retreat.
Location
The battle took place somewhere in the Xinjiang region near modern China's border with Kyrgyzstan.
Background
The first encounter between the Tang Chinese and the Umayyad Arabs had occurred in 715 when Arab general Qutayba ibn Muslim (699-715) invaded the Fergana Valley for the second time, as a continuation of his conquests in Transoxiana: Bukhara in 709, Khwarezm and Samarkand in 712, Shash (Tashkent) in 713 and his first incursion into Ferghana in 714. After his conquest of Khujand, the Tibetan Empire allied with the Arabs. Together they deposed the Ikhshid (king of Ferghana), Baashak, and installed the Ferghanan prince Alutar as King.
The deposed Baashak fled east to the Tang, chased by an Arab raiding party to Kashgar - which the Arabs raided and then turned back. At Kucha, seat of the Anxi Protectorate, Baashak sought Chinese intervention. Meanwhile, the Arab position in Transoxiana was greatly weakened by the failed rebellion and death of Qutayba shortly after.
In December 715, the Chinese sent 10,000 troops under Zhang Xiaosong from Kucha to Ferghana. He defeated the Tibetan-Umayyad occupation force and their client, King Alutar at Namangan and reinstalled Baashak on the throne, now as a Tang Vassal. In 717, the new Umayyad Caliph, Umar ibn Abd al-Aziz, strengthened the alliance with the Tibetans, sending al-Saleet b. Abd Allah al-Hanafi to explain Islam to them. He also sent an army commanded by Abd Allah b. Ma'mar b. Sameer Al-Yashkuri to Transoxiana, hoping to capture the Tarim Basin from the Tang dynasty's Four Garrisons of Anxi. The invading Umayyad forces captured several forts in Ferghana and had taken control of all of Ferghana. The Umayyads then captured Kashgar and proceeded on towards Aksu.
Battle
On or around the date of 15th August, 717, the Umayyads along with their Turgesh and Tibetan allies besieged Aksu and Uqturpan County (85km to the northwest of Aksu) which were under Chinese protection. The commander of China's four Anxi garrisons in Central Asia, Tang Jiahui, sent two armies: one composed of Tang professionally-trained troops consisting of a mix of crossbowmen and spearmen led by Jiahui himself and the other composed of Karluk horsemen led by Ashina Xian.
In the resulting battle, the Umayyad army was heavily defeated and forced to retreat. Al-Yashkuri fled back to Shash, while many Umayyad troops were taken prisoner but were subsequently released after the Caliphate paid a ransom in gold.
At the same time, another Tibetan army was defeated around eastern Qinghai by Tang general Guo Zhiyun, military governor of Longyou circuit (greater Gansu). Ending the coordinated Arab-Tibetan attempt to conquer the Tarim Basin.
Aftermath
As a result of the battle, the Umayyads were expelled from Northern Transoxiana. The Turgesh submitted to the Tang and subsequently attacked the Umayyads in Ferghana. With Chinese backing, the Turgesh launched punitive attacks into Umayyad territory eventually wresting all of Ferghana from the Umayyads with the exception of a few forts. For their loyalty, the Tang emperor conferred imperial titles on the Turgesh khagan Suluk and awarded him the city of Suyab.
On a wider scale, the position of the Arabs throughout all Transoxiana was weakened, with Samarkand and Bukhara sending missions to the Tang seeking help against the Arabs. Even the Yabghu of Tokharistan, and principalities of Afghanistan sent embassies to Chang'an. It took several decades for the Arabs to recover their former position, defeating the Turgesh in 737 at the battle of Battle of Kharistan.
Despite Arab-Chinese hostility in this battle, the Tang allied with the Umayyads against the Turgesh in 735, planning a joint attack on the Turgesh capital of Suyab. However, the Tang defeated them without need of Arab help at Beshbalik in early 736, despite this they still wanted to take Suyab with the Arabs, but eventually agreed to Turgesh surrender in September; so the planned joint operation never occurred. Even 5 years later in 741, the Tang still prioritized the Sino-Arab alliance, refusing to support its own vassal, the king of Tashkent, against the invading Umayyads.