The country with which we are concerned—Nubia, Sennār, and Kordofān—is a comparatively recent conquest of Islam, and it does not properly emerge into the light of history before the sixteenth century. Of its state during the Middle Ages we are very imperfectly informed. Nubia had adopted Coptic Christianity in the sixth century, and there were two kingdoms, Maqarra in the north, with its capital at Dongola, and Aiwa in the south, with its capital at Soba near the modern Khartoum. The Arabs twice overran northern Nubia within a decade or two of the Muslim conquest of Egypt, and in their second expedition they sacked Dongola and destroyed its church; but there was no attempt at annexation, and for some five or six centuries the relations between Muslims and Nubians were based on a treaty concluded in 651–2, which precluded either party from settling in the territory of the other; it also imposed on the Nubians an annual payment of 300 or 360 slaves in exchange for gifts of cloth and grain. The treaty was but indifferently observed, and from time to time there were raids and counter-raids, but Nubia preserved its independence and its isolation from the worlds both of Islam and Christendom. Intercourse with the Muslim lands was not entirely lacking, and in the tenth century two Arabic authors composed accounts of the state of Nubia: I refer to the famous al-Mas'ūdī and to a certain Ibn Salīm or Ibn Sulaym of Aswān, extracts from whose work are preserved in Maqrīzī's Topography of Egypt.