The Byzantine Empire took advantage of the Arab civil war that brought the Abbasid dynasty to power. Emperor Constantine V Isaurus recovered territories and fortresses in Asia Minor. One of them was the fortress of Kamachos, in the region of the Upper Euphrates. The fort in question had fallen into the hands of the Arabs in 679 AD. Since then it had changed owners several times.
And the emperor Constantine, however, soon had to focus his attention on the northern border, on the Bulgarians. Thus the Arabs regained the initiative. In 766 AD a powerful Arab army with soldiers from all over the Arab world and commanded by the caliph's brother al-Abbas ibn Muhammad and general al-Hasan ibn Qataba invaded the imperial territories.
The Arabs, meeting no resistance, headed for Camahon. When they got outside the walls they started building siege engines and tried to fill up the moat. However, the defenders' catapults seriously harassed them and caused them losses. At one point the Arabs attempted a violent night attack at the point where a breach had been created in the walls.
However, the Byzantines were waiting for them and, by rolling down large logs tied to rocks, they repelled them again, killing many. After this, according to Zukin's Syrian chronicle, the Arabs divided their army into two divisions. The first under Abbas moved deeper into Byzantine territory to pillage, while the second, 50,000 strong, remained to besiege and sack Camachon.
Thus, having failed to take it by assault, the Arabs surrounded the little fort, waiting for the brave garrison to surrender through starvation. However, they failed miserably. The garrison held out all autumn and winter. The Arabs, unable to achieve anything in the face of the impregnable guards of the fort and due to the onset of winter, were forced to lift the siege and withdraw, leaving behind thousands of corpses of their fellow warriors, a witness to the defeat of Islam.
The other section of the Arab Army under Abbas had a worse fate. After, through ignorance of the terrain, he lost many men to hunger and thirst as he wandered through Byzantine territory, he arrived in Cappadocia. The Arabs, like locusts, plundered everything but found themselves facing a force of 12,000 Byzantines.
According to the Chronicle of Zukin, the Byzantines attacked the Arabs at night and destroyed them. A few Arabs escaped and returned to their land humiliated. From the retreating Arabs, the editor of Zukin's Chronicle, a monk in Amida (Diyarbakir), was informed of the events.