The Ikhshidid dynasty (الإخشيديون, ) was a dynasty of Turkish mamluk origin, who ruled Egypt and the Levant from 935 to 969. The dynasty carried the Arabic title "Wāli" reflecting their position as governors on behalf of the Abbasids. The Ikhshidids came to an end when the Fatimid army conquered Fustat in 969. Muhammad ibn Tughj al-Ikhshid, a Turkish mamluk soldier, was appointed governor by the Abbasid Caliph al-Radi. The Ikhshidid family tomb was in Jerusalem. The name "Ikhshidid" comes from the Central Asian dynastic name Ikhshid, a nobiliary title whose prestige in Central Asia remained high as late as the 10th century. It was adopted by the Turkic commander and ruler of Egypt Muhammad ibn Tughj, whose grandfather had come from Ferghana. After this title, the short-lived dynasty founded by Muhammad al-Ikhshid is known as the Ikhshidid dynasty. Anarchy at Samarra The creation of the Ikhshidid state was part of the wider disintegration and decentralisation of the Abbasids after the Anarchy at Samarra, whereupon government became more decentralised. The founder, Muhammad ibn Tughj al-Ikhshid, possessed some form of military power and was on friendly relations with Mu'nis al-Muzaffar, a powerful military leader. Before he was appointed to Fustat he held the post of governor of Damascus. He was first appointed to the post of Governor of Egypt in 933 but did not enter it during the first stint. In 935 he was appointed a second time to the governorship whilst the country was in a state of war with multiple factions. He launched a campaign to conquer Egypt by land and sea, the naval forces taking Tinnis and able to outflank Ahmad ibn Kayghalagh, the main opponent, forcing his retreat and facilitating ibn Tughj's subsequent entry to Fustat in August. The Fatimids were a major threat at the time and considerable effort was put into repelling them, culminating in their defeat by Ubayd Allah, ibn Tughj's brother, by November 936. There was remarkable stability in the early years, with an absence of economic chaos and Bedouin raids, coupled with prohibition of looting, which helped pacify Egypt.