Siege of Kamarja

The Siege of Kamarja was fought in 729 between the Turgesh khaganate and its Soghdian allies and the Arab Muslims of the Umayyad Caliphate. The small fortress of Kamarja was one of the last remaining Arab strongholds in Transoxiana, and was attacked by the Turgesh under the personal direction of their ruler, the khagan. Its stubborn defence, which lasted for 58 days, ended with the negotiated withdrawal of its garrison to Samarkand, and became famous in Arabic literature, but failed to save the Arab position in the region.

Background
The region of Transoxiana (Arabic: Ma wara' al-nahr) had been conquered by the Umayyad leader Qutayba ibn Muslim in the reign of al-Walid I (r. 705–715), following the Muslim conquests of Persia and Khurasan in the mid-7th century. The loyalties of Transoxiana's native Iranian and Turkic populations and those of autonomous local rulers remained questionable, however, and in 719 the latter requested aid from the Chinese and their Turgesh vassals. In response, from 720 on the Turgesh launched a series of attacks against the Muslims in Transoxiana, coupled with uprisings against the Caliphate among the local Soghdians. The Umayyad governors initially managed to suppress the unrest, although Umayyad control over the Ferghana Valley was lost. In 724, however, governor Muslim ibn Sa'id al-Kilabi and his army suffered a heavy defeat (the so-called "Day of Thirst") at the hands of the Turgesh when he tried to subdue Ferghana. This defeat pushed the Arabs on the defensive, and even though no pitched battles took place, over the next few years the Arab position in Transoxiana collapsed swiftly: by 728, in the face of the Turgesh attacks and a widespread anti-Arab revolt, only Samarkand and the two fortresses of Kamarja and Dabusiyya on the Zarafshan River remained in Arab hands in all of Transoxiana.

Siege of Kamarja
In 729, the new Arab governor, Ashras ibn Abdallah al-Sulami, managed to cross the Oxus River and reach Bukhara against stiff opposition by the Turgesh and their Soghdian allies, but the Arab victory was narrow, and the Turgesh were able to withdraw unmolested back towards the region of Samarkand, which brought them near the Arab fortress of Kamarja, a fortified town some seven farsakhs—roughly 42 km—west of Samarkand. The subsequent siege of Kamarja, narrated in al-Tabari's History is, in the words of Hugh N. Kennedy, "one of the most vividly described set pieces of the war".

The Turgesh army under the khagan Suluk, which included the contingents of Ferghana, al-Taraband (capital of Shash, modern Tashkent), Afshinah (a town near Samarkand), Nasaf and Bukhara, approached along the Bulkhara–Samarkand road. When they reached Kamarja, the Turgesh and their allies left the road made camp, but the latter's garrison was unaware of their approach as their movements were screened by a hill. When the Arabs took their animals out to water them in the morning and climbed the hill, they were amazed to encounter the "mountain of steel" of their enemies' army, as al-Tabari writes. The Arabs sent some of their animals down the hill towards the river to lure the Turgesh that way, and hastened back to the town. The Turgesh soon discovered them and began pursuing them, but the Arabs knew the terrain better and managed to reach the town and find refuge behind the earthworks, just before their pursuers caught up with them. A fierce fight developed as the Turgesh attacked the gates and tried to enter the town, until the Arabs thrust burning bundles of wood before them, driving the Turgesh back across the moat. In the evening, the Turgesh withdrew, and the Arabs burned the wooden bridge that spanned the moat.

The khagan then sent two embassies to the besieged. The first was Khosrau, a grandson of the last Sassanid Persian ruler, Yazdegerd III (r. 632–651). Khosrau's father, Peroz, had fled to the Tang court in China, and now Khusrau accompanied the Turgesh in hopes of recovering his ancestral throne. When Khosrau approached the garrison, he urged them to surrender and offered them a safe-conduct, while proclaiming the restoration of his realm. The Arabs, however, indignantly refused to hear him and hruled abuses at him. As H.A.R. Gibb writes, the presence of Khosrau "might be taken as an indication that the rebels were receiving encouragement from China also, though the Chinese records are silent on this expedition". After Khosrau's failure, the khagan sent a local, Bazaghari, to parley with the garrison, bringing a few Arab captives along with him to intimidate the garrison. The khagan offered to take up the Arab garrison into his on army, doubling their salary, but this proposal too was rejected with disdain by the Arab negotiator, Yazid ibn Sa'id al-Bahili, with the words "How can the Arabs, who are wolves, be with the Turgesh, who are sheep?". His reply infuriated Bazaghari's companions, who threatened to kill him, so Yazid offered to split the garrison up: one half with their moveable wealth would be allowed to retreat safely, while the other half would remain in service with the Turgesh. Bazaghari accepted this offer and sent Yazid back to convey the terms to the garrison, but once he was back inside the wall, he rejected the terms and exhorted his fellow Arabs to resist.

The khagan then ordered his men to fill the moat with green wood, which would not burn, while the garrison countered by throwing in dry wood as well. After six days, when the moat was full, the Arabs set it afire, and aided by a strong wind, the hard work of the Turgesh was put to nought. The Arab archers also proved effective, exacting a heavy toll among the Turgesh, including Bazaghari. The Turgesh then executed a hundred Arab captives in full view of the garrison. In response, the Arabs killed the 200 young locals they held as hostages, despite their desperate resistance. The narrative of the siege in al-Tabari, evidently drawing from eyewitness accounts, continues with isolated episodes: the determined Turkish assault on the gate, with five of them managing to climb the wall before being repelled, the Soghdian prince of al-Taraband who with his companions assaulted a breach in the wall which led into a house only to be killed by the house's elderly and sick owner and his family, how the Arabs used the wooden boards lining the irrigation ditches to improve their earthworks, or the time when the khagan, coming to inspect the Arab fortifications, received an arrow-shot in the face but saved by his helmet's nose-guard. The stubborn defence of the garrison irritated the khagan, who blamed his Soghdian allies for claiming that there were "fifty donkeys in this (town) and that we would take it in five days, but now the five days have become two months". At length, the khagan resumed negotiations, and offered safe-conduct for either Dabusiyya or Samarkand, which were still in Arab hands. The garrison sent a rider to Samarkand to ask for advice, and was told to choose Dabusiyya, which was closer to Kamarja. After fifty-eight days, out of which, according to al-Tabari, the garrison "did not water their camels for thirty-five days", the siege was over. The Arabs and Turgesh exchanged five hostages each, including one of Suluk's most important nobles, Kursul. Mistrust among both sides was such after their mutual massacre of their captives early in the siege that the Arabs refused to leave until the khagan and his army had departed, and an Arab with a dagger in his hand was seated behind each of the Turgesh hostages, who wore no armour.

As the Arab garrison of Kamarja approached Dabusiyya, the latter's garrison at first believed that Kamarja had fallen and that the soldiers coming towards them were Turgesh, but as they arrayed themselves for battle, a rider sent by the Kamarja troops alerted them as to the real situation, and "the men of al-Dabusiyya galloped forward to carry whoever was too weak to walk or was wounded". At this the hostages began being released, with the Arabs sending a hostage back and the Turgesh in turn releasing one of the hostages they held. At the end, when the last two hostages were left, neither side was willing to let its own hostage go first, until the Arab hostage volunteered to be let go last. For this act of chivalry, he was richly rewarded by Kursul with a suit of armour and a horse.

Aftermath
As Gibb writes, "the fame of the defence of Kamarja spread far and wide, but it brought little relief to the pressure on the Arabs". Almost all of Transoxiana, except for Bukhara and Samarkand, was lost, and even in neighbouring Khwarizm, a revolt broke out, which was nonetheless swiftly suppressed by the local Arab settlers. Samarkand remained the last major outpost of Arab rule deep in Soghdia, and subsequent operations by both sides focused around it. It was while attempting to relieve the Turgesh siege of the city in 731 that the Arabs suffered the calamitous Battle of the Defile, which was followed by the complete collapse of the Arab position in Transoxiana. The Arabs were not able to recover their position until the governorship of Nasr ibn Sayyar, who in 739–741 managed to re-establish the Caliphate's authority up to Samarkand.