Abbasid–Tibetan warfare occurred during the reign of the Abbasid Caliph Al-Ma'mun against the forces of the Tibetan Empire and its vassals, before and after his victory in the Fourth Fitna in 813. Though compelled to offer concessions in exchange for a truce in 810, the caliph renewed the conflict in 814 by dispatching forces under the governor of Khurasan Al-Fadl ibn Sahl to conduct a campaign against the Armies of Tibet and its allies. The Abbasids successful subjugated Kabul, after which Al-Fadl led his armies deeper into the Hindu Kush and Karakoram mountains, where they achieved great victories against the Tibetans.
Background
In 790, the Tibetan Empire had defeated the combined forces of the Tang Dynasty and the Uyghur Khaganate, a victory which allowed the Tibetans to seize the territories of the Anxi Protectorate and access Central Asia, which brought Tibetan territories as far as the eastern frontiers of the Abbasid Caliphate. Although the Tibetan empire had in previous years been allied to the caliphate, geopolitical tensions between the two powers began to mount in the years near the turn of the 9th century, and during the Late Zhenyuan era (reign of Emperor Dezong of Tang). Friction had risen enough to necessitate more than half of Tibet's military forces being stationed in the west in anticipation of military conflict with the Abbasids, as opposed to being directed eastward against Tibet's traditional rival, the Tang of China. The Old Book of Tang records that in 801, when Chinese forces under Wei Gao fought against the Tibetan Empire in Junzhou, troops from Samarkand, the Abbasid Caliphate, and other principalities were amongst the forces which ultimately surrendered to the Tang. The Arab contingents likely represent prisoners of war taken by Tibetan forces and subsequently pressed into service against the Chinese, a fact which would demonstrate that Tibet had engaged in conflict with the Abbasids on their western frontier.
In 808-809, further Tibetan actions against the Abbasid Caliphate in Central Asia are recorded during the rebellion of Rafi ibn al-Layth. According to the Arab historian Al-Ya'qubi, after ibn al-Layth launched his uprising against Caliph Harun al-Rashid in 806 at the city of Samarkand, he eventually secured the support of allied armies from Tibet. Al-Tabari also records the intervention of Oghuz and Qarluq Turks on al-Layth's behalf, possibly in coordination with the Tibetan Empire's involvement. The rebellion escalated into so serious a threat that Caliph Harun had been forced to depart the Al-Thughur frontier, where his forces had recently engaged the armies of Byzantine Emperor Nikephoros I, and advance to Khurasan in order to counter al-Layth and install Harthama bin A'yan as the regional governor. However, Harun died in Tus before reaching Khurasan on 24 March 809. Harun al-Rashid's elder son al-Amin assumed control of the Abbasid territories west of Rayy, while another son, al-Ma'mun assumed control over Abbasid provinces in eastern Iran and Khurasan. Shortly after his ascension in Khurasan, Al-Ma'mun was able to secure the surrender of Rafi ibn al-Layth under promise of pardon.
Al-Mamun's conflicts with the Tibetan Empire
Fourth Fitna and the Abbasid-Tibetan diplomatic arrangement
Despite al-Ma'mun's success in quelling Rafi ibn al-Layth, the foreign contingents al-Layth had called upon to support the rebellion were not subdued so easily, as they remained a serious problem for the new Abbasid ruler of Khurasan. The loyalty of the regional population remained low following the recent rebellion, Otrar's ruler withheld payment of tribute to Al-Ma'mun and diplomatic relations with the Tibetan Empire had broken down, leading to their forces, alongside those of the Qarluqs and the Turk Shahi ruler of Kabul, raiding Abbasids possessions. These crises came at a critical time for Al-Ma'mun, as a conflict with Al-Amin for sole rule over the caliphate was brewing.
I have learned, moreover, of the alienation of Khurasan and the restiveness of its populous and desolate [localities]; of the withdrawal of the yabghu [of the Qarluqs] from submission; of the turning away of the qaghan, lord of Tibet; of the mobilization by the king of Kabul for a raid on those places in Khurasan which are near to him; and of the withholding by the Utrirbandah of the tribute which he used to pay. I have no control over any of these things.
— Al-Ma'mun's description of the geopolitical and military problems he faced in 810, recorded by al-Tabari
Faced with overwhelming threats from both the east and west, al-Ma'mun is even claimed to have contemplated abandoning Khurasan to find refuge in the service of the Tibetan Tsenpo. However, his Vizier Al-Fadl ibn Sahl advised al-Ma'mun to reach a compromise with his enemies to the east via negotiation to initiate a truce, as the coming conflict with Al-Amin demanded al-Ma'mun's full military attention. The prince was instructed to recognise the rulers of Tibet and the Qarluqs and promise them military support in their conflicts on other frontiers, and to send gifts to the Turk Shahi ruler in exchange for peace. With matters on the Eastern frontier temporarily settled via these concessions, al-Ma'mun and Al-Fadl began strengthening their armies for the coming civil war against al-Amin. The treaty concluded may have concluded provisions that al-Ma'mun would be granted refuge by the Tibetan tsenpo or Qarluq khaghan if he were to be defeated by his brother. An account by the Tibetan historical work, bKa' thang sde lnga (Five testaments) describes a state of diplomatic affairs wherein the ruler of a great western empire named Dashi (i.e. the Abbasids of Khurasan) under its King La Mer mu (certainly identified with al-Ma'mun) regularly dispatched gifts regularly of treasure, foods and medicines, to the Tibetan Tsenpo Tridé Songtsen, going so far as to claim he was subservient to the Tibetan Empire. This inflated claim may represent the concessions made by al-Ma'mun to the Tibetans in exchange for peace in from 810-814.
Al-Fadl ibn Sahl's Campaign
Soon after the outbreak of the Fourth Fitna in 811, al-Ma'mun's forces were able to score a major victory over an invasion force dispatched towards Khurasan by al-Amin at the Battle of Ray (811), shifting the momentum of the war in Al-Ma'mun's favour. The following year, al-Ma'muns forces led by Tahir ibn Husayn besieged al-Amin at Baghdad, which concluded with the capture of the city and execution of al-Amin by Tahir. With his victory in the west, al-Ma'mun could finally direct his attention eastwards to reassert Abbasid military prestige vis-a-vis the Central Asian enemies he had been forced to make concessions toward in 810. Al-Fadl ibn Sahl was appointed as the caliph's viceroy of all the lands east of Hamadhan and west of Tibet and was tasked with conducting punitive expeditions against the enemies that had invaded prior to 810.
The first target of al-Fadl was the Turk Shahi ruler of Kabul, whom the Abbasids forced to surrender and convert to Islam before 815. Al-Azraqi records that a beautiful silver statue was dispatched to Al-Ma'mun by the ruler of Kabul as a sign of his submission. The caliph then sent this marvel to be displayed in Mecca. Having instated Abbasid authority over Kabul, al-Fadl is said to have led Abbasid armies deep into the Hindu Kush and Karakoram Mountain ranges. Though tactical details have not survived in the sources, al-Fadl is recorded to have won a victory over the armies of Tibet and its allies in the Wakhan Corridor. This victory cleared the route into Kashmir for the Abbasids, and while conducting operations in this region, al-Fadl defeated the Tibetans again near Gilgit. During this campaign the Abbasids pressed beyond Kashmir, advancing into the western fringes of Tibet itself, before retiring to Khurasan. The Abbasids captured several Tibetan generals and large numbers of Tibetan cavalrymen during their victorious battles, which were subsequently dispatched to Baghdad as spoils of the triumph. Following his expedition into the mountains, al-Fadl turned north towards Otrar where he defeated the Qarluqs, restoring most of Ferghana to the Abbasid Caliphate.
A king from among the kings of Tibet became a Muslim. He had an idol of gold that he worshipped, which was in the shape of a man. On the head of the idol was a crown of gold bedecked with chains of jewelry and rubies and green corundum and chrysolite. It was on a square throne, raised above the ground on legs, and the throne was of silver. On the throne was a cushion of brocade; on the fringe of the cushion were tassels of gold and silver hanging down, and the tassels were as . . . draperies on the face of the throne.
— Description given by Sa'id ibn Yahya of Balkh to Al-Azraqi
Aftermath
Although al-Fadl had led a successful invasion into the western borders of the Tibetan Empire, this expedition took the form of a punitive attack as the Abbasids appear not to have attempted to occupy the mountainous territories they had campaigned through. Consequently, these territories remained in the hands of the Tibetan Empire. Warfare between the Abbasids and Tibetans subsided after c. 815, as military matters elsewhere occupied both states. Despite having been recognised as caliph after defeating his brother in 813, al-Ma'mun still needed to quell regional rebellions, such as those of Abu'l-Saraya and the Khurramite uprising of Babak Khorramdin. For its part, the Tibetan Empire became embroiled in another conflict with the Tang Dynasty and Uyghur Khaganate, the latter of which had captured the city of Liangzhou from the Tibetans in 808. Consequently, following Al-Fadl ibn Sahl's Campaigns, peace seems to have prevailed between Tibet and the Abbasid Caliphate with no further large-scale conflicts recorded between the two powers.