Battle of Tawahin

The Battle of Tawahin (وقعة الطواحين Waqʿat al-Ṭawāhīn, "Battle of the Mills") was fought in 885 between the forces of the Abbasid central government under Abu'l-Abbas ibn al-Muwaffaq (the future Caliph al-Mu'tadid) and the autonomous Tulunid ruler of Egypt and Syria, Khumarawayh. The Abbasid troops initially defeated the Tulunids and plundered Khumarawayh's camp, only to be ambushed by a Tulunid reserve force which waited for the Abbasids to drop their guard. The Abbasid army was routed, and Syria returned to Tulunid control, a fact confirmed by treaty a year later.

Background
Ahmad ibn Tulun, a Turkish soldier, had managed to become governor of Egypt in 868. By using the country's immense wealth to raise an army of his own, and exploiting the instability of the central Abbasid government, over the next years he became de facto autonomous, although he continued to acknowledge the suzerainty of the Abbasid caliph — for most of his reign the powerless al-Mu'tamid — and to forward some tax revenue to the central government. Ibn Tulun's power made him a major rival to the Abbasid regent, al-Mu'tamid's brother al-Muwaffaq. The latter tried in 877 to wrest Egypt from Ibn Tulun, but the attempt failed spectacularly, and in the following year Ibn Tulun extended his area of control over Syria up to the border zone with the Byzantine Empire in the north and up to al-Raqqah in the western Jazira in the east, immediately adjacent to the Abbasid metropolitan province of Iraq.

Relations between Ibn Tulun and al-Muwaffaq were further strained when al-Mu'tamid tried to set the two men against each other to maintain his own independence. In 882 the caliph attempted to escape from his brother's control by fleeing to Ibn Tulun's domain, but he was apprehended en route by Ishaq ibn Kundaj, the governor of Jazira and Mosul, and was sent back to Iraq. This led to a formal breach in relations; al-Muwaffaq ordered that Ibn Tulun be publicly cursed in mosques throughout the empire and stripped of his governorships in favor of Ishaq ibn Kundaj, while Ibn Tulun similarly had al-Muwaffaq publicly cursed, declared him deposed from his position as al-Mu'tamid's second heir and proclaimed a "holy war" against him.

When Ibn Tulun died in 884, he was succeeded by his second son, Khumarawayh, with the approval of the Tulunid grandees but not the Abbasid court. Immediately al-Muwaffaq ended the ongoing negotiations that he had been conducting with Ibn Tulun, and refused to recognize Khumarawayh's rule over Egypt and Syria. A prominent Tulunid general, Ahmad ibn Muhammad al-Wasiti, then defected to al-Muwaffaq, and urged him to make war on the "young and inexperienced" Khumarawayh and recover the provinces for the central government.

Abbasid invasion of Syria and Battle of Tawahin
The initial Abbasid invasion was led by Ishaq ibn Kundaj, the nominal governor of Syria and Egypt, and another general, Muhammad ibn Diwdad Abu'l-Saj. After receiving encouragement from al-Muwaffaq, who promised to send them reinforcements, the two commanders marched into Syria in mid-884. The Tulunid governor of Damascus soon defected to their side, and they were able to take control of Antioch, Hims and Aleppo. Upon learning of the Abbasid advance, Khumarawayh sent troops to Syria. The Tulunid army first proceeded to Damascus, where they succeeded in forcing its rebel governor to flee, and then advanced to Shayzar on the Orontes. The onset of winter, however, resulted in a lull in hostilities, and both sides remained in their camps to wait out the season.

At this point, the reinforcements that al-Muwaffaq had promised arrived from Iraq, under the command of his own son, Abu'l-Abbas. The combined Abbasid forces advanced to Shayzar, where the Tulunid army was still encamped. The latter was caught completely by surprise and was defeated; many of the Egyptians were killed in the fighting. The survivors fled to Damascus, but upon learning that the Abbasid army was headed for them they abandoned the city, allowing the Abbasids to retake it in February 885. The Tulunid forces continued south to Ramlah in the district of Palestine, where they wrote to Khumarawayh of what had transpired. Khumarawayh now decided to personally lead his troops against the Abbasids, and departed from Egypt for Syria.

At the same time, Abu'l-Abbas set out from Damascus and headed for Ramlah, during which he learned of Khumarawayh's arrival in Syria. At this point, however, the Abbasid offensive was hampered by a dispute between its commanders, which was caused when Abu'l-Abbas accused Ishaq ibn Kundaj and Ibn Abu'l-Saj of cowardice. In response to this insult, the two generals decided to abandon the campaign, and left Abu'l-Abbas to face Khumarawayh's forces by himself.

The two armies met at a village called at-Tawahin ("the Mills"), situated between Ramlah and Damascus, on 5/6 April 885 (although later Egyptian sources like al-Maqrizi give the date, probably erroneously, as 7 August). The Tulunid army is said to have numbered 70,000 and the Abbasid only 4,000, but the first engagement was won decisively by the Abbasids, who forced Khumarawayh to flee the field on the back of a donkey. The Abbasid troops then proceeded to plunder the Tulunid camp, with Abu'l-Abbas installing himself in Khumarawayh's own tent. A part of the Tulunid army, however, under Sa'd al-Aysar, remained behind and prepared to ambush the heedless Abbasid troops. Once the Abbasids, secure in their success, "had already laid down their arms and settled in their quarters", Sa'd al-Aysar's men attacked and routed the Abbasid troops, killing several senior commanders and forcing Abu'l-Abbas to flee in turn north towards Tarsus.

Aftermath
Khumarawayh followed up his unexpected victory with successes against Ishaq ibn Kundaj, who eventually submitted to Tulunid authority, as did Ibn Abu'l-Saj and Yazman al-Khadim, thus bringing the whole of the Jazira and Cilicia under Tulunid control. In the end, al-Muwaffaq was forced to recognize the new situation, and a treaty was signed in December 886 recognizing Khumarawayh as hereditary ruler in his possessions for thirty years.