Battle of Mecca (883)

The Battle of Mecca was an armed skirmish fought in 883 between the forces of the Tulunid ruler of Egypt and Syria, Ahmad ibn Tulun, and those of the Abbasid Caliphate, supported by the Saffarid emirate. The battle took place at Mecca in western Arabia and was fought to determine who would gain guardianship over the city during the hajj. It ended with an Abbasid-Saffarid victory and the expulsion of the Tulunid forces from Mecca.

Background
Ahmad ibn Tulun, a Turkish soldier in the service of the Abbasids, had been appointed governor of Egypt in 868. Over the course of the next several years he took advantage of the instability of the Abbasid central government and managed to turn Egypt into a strong power base for himself, gaining absolute mastery over its administration and significantly improving its fiscal situation. As Ibn Tulun grew increasingly entrenched in his governorship he continued to acknowledge the suzerainty of the Abbasid caliph al-Mu'tamid, but at the same time he gradually became a de facto autonomous amir in his own right, backed by his own personal army that he had built and the large stream of revenues that Egypt provided him.

Ibn Tulun's power soon made him a major rival to the effective ruler of the Abbasid state, al-Mu'tamid's brother and regent al-Muwaffaq, and in 877 the latter sent an army on an abortive campaign to oust Ibn Tulun from Egypt. In the following year Ibn Tulun extralegally seized control of Syria and other territories up to the border zone with the Byzantine Empire, creating further conflict with the Abbasid regent, and an unsuccessful attempt in 882 by al-Mu'tamid to escape from his brother's control by fleeing to the court of Ibn Tulun caused a complete breach in relations. In the aftermath of the caliph's flight, al-Muwaffaq ordered that Ibn Tulun be publicly cursed in mosques throughout the empire and de jure dismissed him from his governorships, 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.

Tulunid designs on Mecca
As Ibn Tulun's relations with the Abbasid government deteriorated, he began to turn his attention to the city of Mecca in western Arabia. As one of the Holy Cities of Islam, Mecca carried with it a significant amount of symbolic prestige, and leadership of the annual hajj or pilgrimage was considered a major source of legitimacy for the caliphs. By claiming the rights of guardianship over Mecca, Ibn Tulun likely hoped to secure greater political appeal for himself throughout the Muslim world, and in the process improve his standing with the Abbasid court.

Any attempt by Ibn Tulun to lay claim to Mecca, however, was bound to stir up hostility against him. Not only would such a move be naturally opposed by al-Muwaffaq, but it would also create conflict with 'Amr ibn al-Layth, the powerful Saffarid governor of Sijistan and much of the Islamic East, who had been assigned various responsibilities over the pilgrimage and the Holy Cities. As with Ibn Tulun, 'Amr enjoyed a high degree of independence from the Abbasid government, but unlike the Egyptian ruler he was on relatively cordial terms with the caliphal court during this period, and in regards to Mecca he proved to be particularly jealous to preserve his own rights in the city.

Despite these obstacles, Ibn Tulun had made an initial attempt to establish himself in Mecca in 881, when he sent an agent with a detachment of cavalrymen to represent his interests there. Upon their arrival, however, they found themselves opposed by troops loyal to 'Amr, and the two sides began to quarrel over the issue of whose master's banner would be placed to the right of the minbar in the Great Mosque. Both factions drew swords over the matter, and a battle was narrowly averted only by the intervention of the Abbasid governor of Mecca Harun ibn Muhammad ibn Ishaq al-Hashimi, who deployed his Zanj troops in support of the Saffarid side. 'Amr's representative was therefore able to act as he wished, and his banner was allowed to remain in the place of honor beside the pulpit.

Battle
In 883 Ibn Tulun again endeavored to assert his authority in Mecca, and he dispatched the officers Muhammad ibn al-Sarraj and al-Ghanawi to the city with a force of four hundred and seventy cavalry and two thousand infantry. The Tulunid army reached Mecca on June 8 (two days before the beginning of the pilgrimage month of Dhu al-Hijjah) and found the governor Harun ibn Muhammad absent from the city, being at that time at Bustan ibn 'Amir. Upon their arrival they began distributing money among the populace in order to garner support, giving two dinars each to the Jazzarin and Hannatin and seven dinars to the headmen.

Five days later, on June 13, Ja'far ibn al-Baghamardi entered Mecca with approximately two hundred riders under his command. There he was met by Harun, who had returned to the city, and was reinforced with one hundred twenty horsemen, two hundred blacks, thirty Saffarid cavalrymen, and two hundred infantry from Iraq that the governor had at his disposal. After receiving further assistance from a group of Khurasani pilgrims, Ja'far decided to march out and face the troops of Ibn Tulun. The ensuing battle, which took place in the hollow of Mecca, ended in a victory for the government forces, who killed two hundred of Ibn Tulun's men and compelled the remainder to flee to the surrounding hills. As the Tulunid soldiers ran off their animals and money were confiscated, and al-Ghanawi's tent, which contained some two hundred thousand dinars, was seized by Ja'far.

Aftermath
Following the battle, Ja'far granted a pardon to the Egyptians, Jazzarin and Hannatin. In the mosques of Mecca a letter was read cursing Ibn Tulun for the incident, and the people and the possessions of the merchants were declared to now be safe.

Ibn Tulun did not long survive the battle; he grew sick and died in May 884 and was succeeded by his son Khumarawayh. Shortly after Ibn Tulun's death al-Muwaffaq ordered a general invasion of Tulunid Syria (which was eventually defeated at the Battle of Tawahin in April 885), and the Tulunids and Abbasids spent the next several years fighting each other for control of Syria and the Jazira.