Battle of Aksu (717)

The Battle of Aksu (معركة أقسو) was fought between the Umayyad Caliphate, and their Turgesh and Tibetan allies, against the Tang dynasty, and their Karluk and Western Turk allies. In 717 AD, the Umayyads, guided by their Turgesh allies, besieged Buat-ɦuɑn (Aksu) and Dai-dʑiᴇk-dʑiᴇŋ (Uqturpan) 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 AD when Ikhshid, the king of the Fergana Valley, was deposed with the help of the Umayyad Caliphate and a new king Alutar was installed on the throne. The deposed king fled to Kucha (seat of the Anxi Protectorate), and sought Chinese intervention. The Chinese sent 10,000 troops under Zhang Xiaosong to Ferghana. He defeated Alutar and the Umayyad occupation force at Namangan and reinstalled Ikhshid on the throne. In 717 AD, the Arabs attacked Transoxiana again hoping to capture the Tang dynasty's Four Garrisons of Anxi district. 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
In 717 AD, the Umayyads 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 the other composed of Karluk horsemen led by Ashina Xin. In the resulting battle, the Umayyad army was heavily defeated and forced to retreat. Many Umayyad troops were taken prisoner but were subsequently released after the Caliphate paid a ransom in gold.

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. For their loyalty, the Tang emperor conferred imperial titles on the Turgesh khagan Suluk and awarded him the city of Suyab. 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.