Muhammad ibn Tughj al-Ikhshid

Abū Bakr Muḥammad ibn Ṭughj ibn Juff ibn Yiltakīn ibn Fūrān ibn Fūrī ibn Khāqān (8 February 882 – 24 June 946), better known by the title al-Ikhshīd (آلإخشي) after 939, was an Abbasid commander and governor who became the autonomous ruler of Egypt and parts of Syria from 935 until his death in 946. He was the founder of the Ikhshidid dynasty, which ruled the region until the Fatimid conquest of 969.

The son of Tughj ibn Juff, a general of Transoxianian origin who served both the Abbasids and the autonomous Tulunid rulers of Egypt and Syria, Muhammad ibn Tughj was born in Baghdad but grew up in Syria and acquired his first military and administrative experiences at his father's side. He had a turbulent early career: he was imprisoned along with his father by the Abbasids in 905, was released in 906, participated in the murder of the vizier al-Abbas ibn al-Hasan al-Jarjara'i in 908, and fled Iraq to enter the service of the then governor of Egypt, Takin al-Khazari. Eventually he acquired the patronage of a number of influential Abbasid magnates, chiefly the powerful commander-in-chief Mu'nis al-Muzaffar. These ties led him to being named governor first of Palestine and then of Damascus. In 933, he was briefly named governor of Egypt, but this order was revoked after the death of Mu'nis and Ibn Tughj had to fight to preserve even his governorship of Damascus. In 935, he was re-appointed to Egypt, where he quickly defeated a Fatimid invasion and stabilized the turbulent country. His reign marks a rare period of domestic peace, stability and good government in the annals of early Islamic Egypt. In 938 he asked, and received, from Caliph al-Radi the title of al-Ikhshid, which had been borne by the rulers of his ancestral Farghana Valley. It is by this title that he was known thereafter to contemporaries and modern historiography.

Throughout his governorship, al-Ikhshid was engaged in conflicts with other regional strongmen for control over Syria, possession of which was necessary to shield Egypt from invasion from the east, but unlike many other Egyptian leaders, notably the Tulunids themselves, he was prepared to bide his time and compromise with his rivals. Although he was initially in control of the entire region, he was forced to cede the northern half to Ibn Ra'iq in 939–942. Following Ibn Ra'iq's murder, al-Ikhshid reimposed his control over northern Syria, only to have it challenged by the Hamdanids. In 944 al-Ikhshid met Caliph al-Muttaqi at ar-Raqqa, where he had fled from the various strongmen vying for control of his person and the caliphal government in Baghdad. Although unsuccessful in persuading the Caliph to come to Egypt, he received recognition of hereditary rule over Egypt, Syria and the Hejaz for thirty years. Following his departure, the ambitious Hamdanid prince Sayf al-Dawla seized Aleppo and northern Syria in the autumn of 944, and although defeated and driven out of Syria by Ibn Tughj himself in the next year, a treaty dividing the region along the lines of the agreement with Ibn Ra'iq was concluded in October. Ibn Tughj died nine months later, leaving his son Unujur, under the tutelage of the powerful black eunuch Abu al-Misk Kafur, as ruler of his domains.

Origin and early life
Muhammad ibn Tughj was born in Baghdad on 8 February 882. His family originated from the Farghana Valley in Transoxiana, whence his grandfather Juff came to serve as a military slave (mamluk) in the Abbasid court at Samarra—at about the same time as the father of Ibn Tulun, the founder of the Tulunid dynasty, did the same. Juff and his son, Muhammad's father Tughj, both served the Abbasids, but Tughj later entered the service of the Tulunids, who since 868 had become autonomous rulers of Egypt and Syria. Tughj served the Tulunids as governor of Tiberias, Aleppo (the capital of the district of Qinnasrin) and Damascus. He particularly distinguished himself by repelling the Qarmatian attack on Damascus in 903. Thus Muhammad ibn Tughj spent a great part of his youth in the Tulunid Levant, gaining, at his father's side, his first experiences in administration—he served as his father's sub-governor of Tiberias—and war.

After the death of Ibn Tulun's son Khumarawayh in 896, however, the Tulunid state quickly began crumbling from within, and failed to put up any serious resistance when the Abbasids moved to re-establish direct control over Syria and Egypt in 905. Tughj defected to the invading Abbasids under Muhammad ibn Sulayman, and was named governor of Aleppo in return. However Ibn Sulayman himself fell victim to court intrigues soon after, and Tughj along with his sons Muhammad and Ubayd Allah were imprisoned in Baghdad. Tughj died in prison in 906, and the brothers were freed shortly after. The sons of Tughj participated in the palace coup that tried to depose the new Caliph, al-Muqtadir (reigned 908–932), in favour of the older Ibn al-Mu'tazz in December 908. Although the attempt failed, Muhammad ibn Tughj and his brother were able to avenge themselves for their imprisonment on the vizier al-Abbas ibn al-Hasan al-Jarjara'i, whom they struck down along with Husayn ibn Hamdan. After the coup's failure, the three fled: Ibn Hamdan returned to his native Upper Mesopotamia, Ubayd Allah fled east to Yusuf ibn Abi'l-Saj, while Muhammad fled to Syria.

In Syria, Muhammad ibn Tughj joined the service of the tax supervisor of the local provinces, Abu'l-Abbas al-Bistam. He soon followed his new master to Egypt, and after al-Bistam's death in June 910 he continued serving the latter's son. Eventually, he gained the attention of the local governor, Takin al-Khazari, who sent him to govern the lands beyond the Jordan River, with his seat at Amman. In 918, he rescued a hajj caravan, among which was one of the ladies-in-waiting of al-Muqtadir's mother, from Bedouin raiders, thereby improving his standing at the Abbasid court. Two years later, Ibn Tughj gained an influential patron when he briefly served under the powerful Abbasid commander-in-chief, Mu'nis al-Muzaffar, when he came to help defend Egypt from a Fatimid invasion. During the campaign, Ibn Tughj commanded the finest troops of the Egyptian army. The two men evidently established a rapport, and remained in contact thereafter.

When Takin returned to Egypt as governor in 923, Ibn Tughj came to join him there. This lasted until 928, when the two men fell out over Takin's refusal to give Ibn Tughj the post of governor of Alexandria. Ibn Tughj escaped Fustat by a ruse, and managed to obtain for himself an appointment as governor of Palestine from Baghdad; the incumbent, al-Rashidi, fled the governor's seat at Ramalla for Damascus, whose governorship he assumed. His flight, according to historian Jere L. Bacharach, may indicate that Ibn Tughj commanded a significant military force. Three years later, in July 931, Muhammad ibn Tughj was promoted to governor of Damascus, while al-Rashidi returned to Ramalla. Both these appointments were likely the result of Ibn Tughj's relation with Mu'nis al-Muzaffar, who at this time was at the zenith of his power and influence.

Takeover of Egypt
Following Takin's death in March 933, and the failure of his son and nominated successor, Muhammad, to establish his authority in the country, in August 933, Ibn Tughj was named as the new governor, but the appointment was revoked a month later, before he could reach Egypt, and Ahmad ibn Kayghalagh was appointed in his place. The timing of Ibn Tughj's recall coincides with the arrest (and subsequent murder) of Mu'nis by Caliph al-Qahir (r. 932–934) on 22 September, suggesting that Ibn Tughj's nomination was in all likelihood also due to Mu'nis in the first place. This view is reinforced by the fact that after the fall of Mu'nis, al-Qahir sent a eunuch called Bushri to replace Ibn Tughj in Damascus as well. Bushri was able to take over the governorship of Aleppo (to which he also had been appointed), but Ibn Tughj resisted his replacement, and defeated and took him prisoner. The Caliph then charged Ahmad ibn Kayghalagh with forcing Ibn Tughj to surrender, but although Ahmad marched against Ibn Tughj, both avoided a direct confrontation. Instead the two men met and reached an agreement of mutual support, upholding the status quo. However, Ahmad ibn Kayghalagh soon proved incapable of restoring order to the increasingly turbulent province. By 935, the troops were rioting over lack of pay, and Bedouin raids had recommenced. At the same time, Takin's son Muhammad and the fiscal administrator al-Madhara'i undermined Ahmad ibn Kayghalagh and coveted his position. Infighting broke out among the troops between the Easterners (Mashariqa), chiefly Turkish soldiers, who supported Muhammad ibn Takin, and the Westerners (Maghariba), probably Berbers and Black Africans, who backed Ahmad ibn Kayghalagh. With the support this time of the former vizier and inspector-general of the western provinces al-Fadl ibn Ja'far ibn al-Furat, whose son was married to one of Ibn Tughj's daughters, Ibn Tughj was once more named governor of Egypt. Taking no chances, Ibn Tughj organized a regular invasion of the country by land and sea. Although Ahmad ibn Kayghalagh was able to delay the advance of the army, Ibn Tughj's fleet took Tinnis and the Nile Delta and moved onto the capital Fustat. Outmanoeuvred and defeated in battle, Ahmad ibn Kayghalagh fled to the Fatimids. The victorious Muhammad ibn Tughj entered Fustat on 26 August 935.

With the capital under his control, Ibn Tughj now had to confront the Fatimids. The Maghariba who refused to submit to Ibn Tughj had fled to Alexandria and thence to Barqa, from where they invited the Fatimid ruler al-Qa'im (r. 934–946) to invade Egypt and pledged their assistance. The Fatimid invasion met with initial success: the Fatimid army's Kutama Berbers captured the island of al-Rawda on the Nile and burned its arsenal, Ibn Tughj's admirals Ali ibn Badr and Bajkam, as well as the commander of Alexandria, al-Habashi, defected to the Fatimids, and Alexandria itself was captured in March 936. Nevertheless, on 31 March, Ibn Tughj defeated the Fatimid forces near Alexandria, driving them out of the city and forcing the Fatimids to once again retreat from Egypt to their base at Barqa. During the campaign, Ibn Tughj notably prohibited his troops from looting, which, according to J. L. Bacharach was indicative of his "long-term view towards his stay in Egypt".

Government of Egypt
Writing to Caliph al-Radi (r. 934–940) in 936, Muhammad ibn Tughj could present a commendable record: the Fatimid invasion was defeated and first measures for improving the financial situation in the province had been undertaken. The Caliph confirmed him in his post and sent robes of honour. As Hugh N. Kennedy writes, "in some ways the Fatimid threat actually helped Ibn Tughj" for, as long as he supported the Abbasids, "the caliphs were prepared to give their approval to his rule in return". His standing in the Abbasid court was sufficient for him to ask in 938 for the honorific title (laqab) of al-Ikhshid, originally held by the kings of his ancestral homeland Farghana. Caliph al-Radi granted the request, although formal approval was delayed until July 939. After receiving official confirmation, Ibn Tughj required that he be henceforth addressed solely by his new title.

Very little is known about al-Ikhshid's domestic policies. However, the silence of the sources on domestic troubles during his reign—barring a minor Shi'ite revolt in 942, which was swiftly suppressed—stands in stark contrast to the usual narrative of Bedouin raids, urban riots over high prices, or military and dynastic revolts and intrigues, and indicates that he was successful in restoring internal tranquillity and orderly government in Egypt. His potential rivals Muhammad ibn Takin and al-Madhara'i were quickly won over and incorporated in the new administration. The latter had tried to resist al-Ikhshid's takeover in vain, as his troops had immediately defected, and was initially imprisoned by al-Ikhshid, only to be released in 939 to serve as regent of al-Ikhshid's son and heir, Unujur. Imprisoned once more in 946, he was later released and spent his life until his death in 957 in retirement. Like the Tulunids before him, al-Ikhshid also took particular care to build up a considerable military force of his own, including Turkic and Black African slave soldiers.

Foreign policy and the struggle for Syria
As commander and ruler, al-Ikhshid was a patient and cautious man. He achieved his goals as much by diplomacy and ties to powerful personages in the Baghdad regime as by force, and even then he tended to avoid direct military confrontation whenever possible. His conflict with Ahmad ibn Kayghalagh is indicative of his approach: instead of a direct clash, the truce between the two gave al-Ikhshid the time to reconnoitre the situation in Egypt before acting. Although following in the footsteps of Ibn Tulun, his ambitions were more modest and his objectives more practical, as became particularly evident in his policies towards Syria and the rest of the Caliphate. Historically, possession of Syria, and particularly Palestine, has been a constant foreign policy objective of any ruler of Egypt, as this presented the most likely invasion route into the country. Ibn Tulun before and Saladin after al-Ikhshid were two typical examples of Egyptian rulers who spent much of their reigns in securing control of Syria, and indeed used Egypt mostly as a source of revenue and resources to accomplish this goal. Al-Ikhshid differed from them; Bacharach describes him as a "cautious, conservative realist". His goals were limited but clear: his main concern was Egypt proper and the establishment of his family as a hereditary dynasty over it, while Syria remained a secondary objective. In his foreign policy, unlike other contemporary military strongmen, he had no intention of entering the contest for control of Baghdad and the caliphal government through the all-powerful office of amir al-umara; indeed, when Caliph al-Mustakfi (r. 944–946) offered him the post, he turned it down.

Conflict with Ibn Ra'iq
Following the expulsion of the Fatimids from Egypt, al-Ikhshid's troops occupied all of Syria up to Aleppo, allying himself, as Ibn Tulun had done, with the local tribe of Banu Kilab to strengthen his hold over northern Syria. As governor of Syria, his remit extended to the borderlands (thughur) with the Byzantine Empire in Cilicia. Thus in 936/7 or 937/8 (most likely in autumn 937) he received an embassy from the Byzantine emperor, Romanos I Lekapenos (r. 920–944), to organize a prisoner exchange. It was a special honour, since correspondence and negotiations for such events were normally directed to the Caliph rather than provincial governors. The exchange took place in autumn 938, resulting in the release of 6,300 Muslims for an equivalent number of Byzantine captives. As the Byzantines held 800 more prisoners than the Muslims, these had to be ransomed and were gradually released over the next six months.

While the amir al-umara Ibn Ra'iq was in power in Baghdad (936–938) with al-Ikhshid's old friend al-Fadl ibn Ja'far ibn al-Furat as vizier, relations with Baghdad were good. Following Ibn Ra'iq's replacement by the Turk Bajkam, however, Ibn Ra'iq received nomination by the Caliph to the governorship of Syria and in 939 marched west to claim it from al-Ikhshid's forces. Ibn Ra'iq's appointment enraged al-Ikhshid, who sent an envoy to Baghdad to clarify the situation. There Bajkam informed him that the Caliph might appoint whomever he chose, but that it ultimately did not matter: it was military strength that would determine who was governor of Syria and even of Egypt, not any appointment by a figurehead caliph. If either Ibn Ra'iq or al-Ikhshid emerged victorious from the conflict, caliphal confirmation would soon follow. Al-Ikhshid was even more infuriated by the reply, and reportedly for a time even threatened to give one of his daughters to the Fatimid caliph al-Qa'im and to have coins minted and the Friday prayer read in his name rather than the Abbasid caliph. In the event this came to nought, as the Abbasids formally reconfirmed his position, and the Fatimids themselves were preoccupied with the revolt of Abu Yazid.

From ar-Raqqa, Ibn Ra'iq's troops swiftly took over the districts of northern Syria, where al-Ikhshid's brother Ubayd Allah was governor, while the Egyptian forces retreated south. By October/November, Ibn Ra'iq's men had reached Ramalla and moved on into the Sinai. Al-Ikhshid led his army in person against Ibn Ra'iq, but after a short clash at al-Farama, the two men came to an understanding, dividing Syria between them: the areas from Ramalla to the south would be under al-Ikhshid, and the areas to the north under Ibn Ra'iq. In May/June 940, however, al-Ikhshid learned that Ibn Ra'iq had once again moved against Ramalla. Once more, the Egyptian ruler led his army in person to battle. Although defeated at al-Arish, al-Ikhshid was able to quickly rally his troops and ambush Ibn Ra'iq, preventing him from entering Egypt proper and forcing him to retreat back to Damascus. Al-Ikhshid sent his brother, Abu Nasr al-Husayn, with another army against Ibn Ra'iq, but he was defeated and killed at Lajjun. Despite his victory, Ibn Ra'iq opted for peace: he gave Abu Nasr an honourable burial, and sent his son, Muzahim, as envoy to Egypt. True to his political strategy, al-Ikhshid accepted. The agreement saw the restoration of the territorial status quo agreed the previous year, but with al-Ikhshid paying an annual tribute of 140,000 gold dinars. The deal was cemented by the marriage of Muzahim with al-Ikhshid's daughter Fatima.

Conflict with the Hamdanids
Peace did not last for long, as the political turmoil in Baghdad continued. In September 941, Ibn Ra'iq assumed once more the post of amir al-umara at the invitation of Caliph al-Muttaqi (r. 940–944), but he was not as strong as before. Unable to stop the advance of another strongman, Abu'l-Husayn al-Baridi of Basra, both Ibn Ra'iq and the Caliph were forced to abandon Baghdad and seek the help of the Hamdanid ruler of Mosul. The latter soon had Ibn Ra'iq assassinated (April 942) and succeeded him as amir al-umara with the laqab of Nasir al-Dawla. Al-Ikhshid used the opportunity to reoccupy Syria for himself, joining his forces in person in June 942, and venturing as far as Damascus, before returning to Egypt in January 943. The Hamdanids also staked claim on Syria at the same time, but the sources do not record details of their expeditions there. Nasir al-Dawla's position as amir al-umara proved not to be very strong either, and in June 943 he was ousted by the Turkish general Tuzun. In October, Caliph al-Muttaqi, fearing that Tuzun intended to replace him, fled the capital and sought refuge with the Hamdanids. Although Nasir al-Dawla and his brother Sayf al-Dawla sheltered the Caliph, they also did not confront Tuzun's troops, and in May 944, they reached an agreement that gave Upper Mesopotamia and northern Syria to the Hamdanids in exchange for recognizing Tuzun's possession of Iraq. Nasir al-Dawla sent his cousin al-Husayn ibn Sa'id to take over the Syrian provinces allotted to him in this agreement. The Ikhshidid forces either defected or retreated, and al-Husayn swiftly took over the districts of Qinasrin and Hims.

In the meantime, al-Muttaqi with Sayf al-Dawla had fled Tuzun's advance to ar-Raqqa, but the Caliph grew increasingly suspicious of the Hamdanids, and wrote to al-Ikhshid (perhaps already as early as the winter of 943), asking for aid. The latter immediately responded by leading an army in person into Syria. The Hamdanid garrisons withdrew before him, and in September 944, al-Ikhshid reached ar-Raqqa. Distrusting the Hamdanids given their treatment of Ibn Ra'iq, he waited until Sayf al-Dawla had left the city before entering the city to meet the Caliph. Al-Ikhshid tried without success to persuade al-Muttaqi to come with him to Egypt, or at least to stay in ar-Raqqa, while the Caliph tried to get al-Ikhshid to march against Tuzun, which the latter refused. The meeting was not entirely fruitless, as al-Ikhshid secured from the Caliph the recognition of his authority over Egypt, Syria with the thughur as well as the Hejaz (carrying with it the prestigious guardianship of the two holy cities of Mecca and Medina) for himself and his sons for thirty years, an arrangement that echoed the similar agreement between the Tulunid Khumarawayh and Caliph al-Mu'tamid in 886. This development had already been anticipated by al-Ikhshid the previous year, when he named his son Unujur, despite the latter not having yet come of age, as his regent during his absences from Egypt, and had required an oath of allegiance (bay'a) to be sworn to him. Nevertheless, as Michael Brett comments, the territories conferred were "mixed blessings", as the holy cities were exposed to Qarmatian raids, while the marches of the thughur were increasingly menaced by the Byzantines and Aleppo with northern Syria was coveted by the Hamdanids.

In the event, al-Muttaqi was persuaded by the emissaries of Tuzun, who protested his loyalty, to return to Iraq, only to be seized, blinded and deposed on 12 October and replaced by al-Mustakfi. Al-Mustakfi reconfirmed al-Ikhshid's governorship, but this was by this point an empty gesture. Indeed, according to J. L. Bacharach, although the 13th-century historian Ibn Sa'id al-Maghribi reports that al-Ikhshid immediately took the bay'a and read the Friday prayer in the new caliph's name, based on the available numismatic evidence, he appears to have delayed recognition of both al-Mustakfi and his Buyid-installed successor al-Muti (r. 946–974) for several months by refraining from including them in his coinage, in an act that was a statement of his relative independence form Baghdad.

Following his meeting with al-Muttaqi, al-Ikhshid returned to Egypt, leaving the field open for the ambitious Sayf al-Dawla. The Ikhshidid forces left behind in Syria were relatively weak, and the Hamdanid leader, having gained the support of the Banu Kilab, had little difficulty in capturing Aleppo on 29 October 944. He then began extending his control over the provinces of northern Syria down to Hims. Al-Ikhshid sent an army under the eunuchs Abu al-Misk Kafur and Fatik against the Hamdanid, but it was defeated bear Hama and retreated back to Egypt, abandoning Damascus and Palestine to the Hamdanids. Al-Ikhshid was then forced to once again lead a campaign in person in April 945, but at the same time he sent envoys proposing to Sayf al-Dawla an agreement along the lines of the one with Ibn Ra'iq: the Hamdanid prince would get to keep northern Syria, while al-Ikhshid would pay him an annual tribute for the possession of Palestine and Damascus. Sayf al-Dawla refused, and reportedly even boasted that he would conquer Egypt itself, but al-Ikhshid held the upper hand: his agents managed to bribe several Hamdanid leaders, and especially by winning over the citizens of Damascus, who barred their gates before the Hamdanid and opened them for al-Ikhshid. The two armies met near Qinnasrin in May, with the Hamdanids being defeated. Sayf al-Dawla fled to ar-Raqqa, leaving his capital Aleppo to be captured by al-Ikhshid.

Nevertheless, in October the two sides came to an agreement, broadly on the lines of the earlier Ikhshidid proposal: al-Ikhshid acknowledged Hamdanid control over northern Syria, and even consented to sending an annual tribute in exchange for Sayf al-Dawla's renunciation of all claims on Damascus. The Hamdanid ruler was also to marry one of al-Ikhshid's daughters or nieces. For al-Ikhshid, the maintenance of Aleppo was less important than southern Syria with Damascus, which was Egypt's eastern bulwark. Provided that these remained under his control, he was more than willing to allow the existence of a Hamdanid state in the north. The Egyptian ruler knew that he would have difficulty in asserting and maintaining control over northern Syria and Cilicia, which were traditionally oriented more towards Upper Mesopotamia and Iraq. By abandoning its claims on these distant provinces, not only would Egypt be spared the cost of maintaining a large army there, but the Hamdanid emirate would also fulfil the useful role of a buffer state against incursions both from Iraq and also from a resurgent Byzantine Empire. Despite Sayf al-Dawla's attempt to push again into southern Syria soon after al-Ikhshid's death, the border held, and even outlived both dynasties. The new border formed the dividing line between Mesopotamian-influenced northern Syria and the Egyptian-controlled southern part of the country, and was to last until the Mamluks seized the entire country in 1260.

Death and legacy
In mid-spring 946, al-Ikhshid sent emissaries to the Byzantines for yet another prisoner exchange (which eventually would take place under Sayf al-Dawla's auspices in October). Emperor Constantine VII (r. 913–959) sent an embassy under John Mystikos in response, which arrived at Damascus on 11 July. On 24 July 946, al-Ikhshid died in Damascus. The succession of his son Unujur was peaceful and undisputed, due to the influence of the powerful commander-in-chief, Kafur. The talented Kafur, one of the many Black African slaves recruited by al-Ikhshid, remained the paramount minister and virtual ruler of Egypt over the next 22 years, assuming power on his own right in 966 until his death two years later.

Already medieval historians noted the many parallels between al-Ikhshid and his Tulunid predecessors, especially Khumarawayh. Ibn Sa'id even reported that according to Egyptian astrologers, the two men had entered Egypt on the same day of the year and with the same star in the same ascendant. There were important differences, however, for al-Ikhshid lacked the "flamboyance" (Hugh Kennedy) of the Tulunids. Al-Ikhshid's caution and self-imposed restraint in his foreign policy objectives also stood in stark contrast with his contemporaries and other rulers of Egypt who preceded and followed him, earning him a reputation of extreme caution, often misinterpreted as timidity by contemporaries. He was also described as less cultivated than his predecessor Ibn Tulun. Unlike Ibn Tulun, who built an entire new capital at al-Qatta'i and a famous mosque, al-Ikhshid was neither a patron of artists and poets nor a major builder. According to historian Thierry Bianquis, he was described by medieval chroniclers as "a choleric and gluttonous man, yet shrewd and inclined toward avarice", but with a fondness for luxuries imported from the east, and especially perfumes. His love of eastern luxuries soon spread among the upper classes of Fustat as well and influenced the style and fashion of local Egyptian produce in turn, which began to imitate them.