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 July 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 (Levant) 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 Turkic 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 governor of Egypt, Takin al-Khazari. Eventually he acquired the patronage of several 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 Caliph al-Radi granted his request for 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.
Throughout his governorship, al-Ikhshid was engaged in conflicts with other regional strongmen for control over Syria, without which Egypt was vulnerable to 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 entirety of Syria, he was forced to cede the northern half to Ibn Ra'iq between 939 and 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 Raqqa; the caliph had fled there from the various strongmen vying to kidnap him and control 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, and was buried in Jerusalem. He left his son Unujur as ruler of his domains, under the tutelage of the powerful black eunuch Abu al-Misk Kafur.
Origin and early life
According to the biographical dictionary compiled by Ibn Khallikan, Muhammad ibn Tughj was born in Baghdad on 8 February 882, on the street leading to the Kufa Gate. His family was of Turkic origin from the Farghana Valley in Transoxiana, and claimed royal descent; the name of his ancestor, "Khaqan", is a Turkic royal title. Muhammad's grandfather Juff left Farghana to enter military service in the Abbasid court at Samarra, as did the father of Ibn Tulun, the founder of the Tulunid dynasty. 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 (capital of the district of Jordan), Aleppo (the capital of the district of Qinnasrin) and Damascus (capital of the homonymous district). He played a major role in repelling the Qarmatian attack on Damascus in 903; although defeated in battle, he held the city itself against the Qarmatians for seven months until, with the arrival of reinforcements from Egypt, the Qarmatians were driven away. Thus Muhammad ibn Tughj spent a great part of his youth in the Tulunid Levant at his father's side, gaining 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, 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 al-Katib, and was named governor of Aleppo in return; Muhammad al-Katib 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 with the aid of Husayn ibn Hamdan. After the coup's failure, the three fled: Ibn Hamdan returned to his native Upper Mesopotamia and 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 joined him there, but the two men fell out in 928 over Takin's refusal to give Ibn Tughj the post of governor of Alexandria. Ibn Tughj escaped the capital 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 Ramla 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 Ramla. 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 Takin died in March 933, and his son and nominated successor, Muhammad, failed to establish his authority in Egypt. Ibn Tughj was named as the new governor in August 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 () on 22 September, suggesting that Ibn Tughj's nomination was in all likelihood also due to Mu'nis. The fact that al-Qahir sent a eunuch called Bushri to replace Ibn Tughj in Damascus after the fall of Mu'nis reinforces this view. 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.
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 Abu Bakr Muhammad ibn Ali al-Madhara'i—the heir of a dynasty of bureaucrats that had handled the province's finances since the time of Ibn Tulun and amassed enormous wealth—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 the governor of Egypt. Taking no chances, Ibn Tughj organized an 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 on to 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 then to Barqa under the leadership of Habashi ibn Ahmad, and invited the Fatimid ruler al-Qa'im () to invade Egypt with 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 defected to the Fatimids, and Alexandria itself was captured in March 936. Nevertheless, on 31 March, Ibn Tughj's brother al-Hasan 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 () 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" since, 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.