it on the Coptic alphabet, while also utilizing Greek, Coptic and Arabic. Women enjoyed high social status: they had access to education, could own, buy and sell land and often used their wealth to endow churches and church paintings. Even the royal succession was matrilineal, with the son of the king's sister being the rightful heir. Since the late 11th/12th century, Makuria's capital Dongola was in decline, and Alodia's capital declined in the 12th century as well. In the 14th (the earliest recorded migration from Egypt to the Sudanese Nile Valley dates to 1324) and 15th century Bedouin tribes overran most of Sudan, migrating to the Butana, the Gezira, Kordofan and Darfur. In 1365 a civil war forced the Makurian court to flee to Gebel Adda in Lower Nubia, while Dongola was destroyed and left to the Arabs. Afterwards Makuria continued to exist only as a petty kingdom. The last known Makurian king was Joel, who is attested for the years 1463 and 1484 and under whom Makuria probably witnessed a brief renaissance. After his death the kingdom probably collapsed. To the south, the kingdom of Alodia fell to either the Arabs, commanded by tribal leader Abdallah Jamma, or the Funj, an African people originating from the south. Datings range from the 9th century after the Hijra ( 1396–1494), the late 15th century, 1504 to 1509. An Alodian rump state might have survived in the form of the kingdom of Fazughli, lasting until 1685. Islamic kingdoms (c. 1500–1821) In 1504 the Funj are recorded to have founded the kingdom of Sennar, in which Abdallah Jamma's realm was incorporated. By 1523, when Jewish traveller David Reubeni visited Sudan, the Funj state already extended as far north as Dongola. Meanwhile, Islam began to be preached on the Nile by Sufi holymen who settled there in the 15th and 16th centuries and by David Reubeni's visit king Amara Dunqas, previously a Pagan or nominal Christian, was recorded to be Muslim. However, the Funj would retain un-Islamic customs like the divine kingship or the consummation of alcohol until the 18th century. Sudanese folk Islam preserved many rituals stemming from Christian traditions until the recent past. Soon the Funj came in conflict with the Ottomans, who had occupied Suakin around 1526 and eventually pushed south along the Nile, reaching the third Nile cataract area in 1583/1584. A subsequent Ottoman attempt to capture Dongola was repelled