Qasr Ibrim. It is not known what happened to the royal Nobatian family after the unification, but it is recorded that Nobatia remained a separate entity within the unified kingdom governed by an Eparch. Between 639 and 641 the Muslim Arabs overran Byzantine Egypt. A Byzantine request for help remained unanswered by the Nubians due to conflicts with the Beja. In 641 or 642 the Arabs sent a first expedition into Makuria. While it is not clear how far south it penetrated it was eventually defeated. A second invasion led by Abdallah abi Sarh followed in 651/652, when the attackers pushed as far south as Dongola. Dongola was besieged and bombarded by catapults. While they damaged parts of the town they could not penetrate the walls of the citadel. Muslim sources highlight the skill of the Nubian archers in repelling the invasion. With both sides being unable to decide the battle in their favour, abi Sarh and the Makurian king Qalidurut eventually met and drew up a treaty known as Baqt. Initially it was a ceasefire also containing an annual exchange of goods (Makurian slaves for Egyptian wheat, textiles etc.), an exchange typical for historical North East African states and perhaps being a continuation of terms already existing between the Nubians and Byzantines. Probably in Umayyad times the treaty was expanded by regulating the safety of Nubians in Egypt and Muslims in Makuria. While some modern scholars view the Baqt as a submission of Makuria to the Muslims it is clear that it was not: the exchanged goods were of equal value and Makuria was recognized as an independent state, being one of the few to beat back the Arabs during the early Islamic expansion. The Baqt would remain in force for more than six centuries, although at times interrupted by mutual raids. The 8th century was a period of consolidation. Under king Merkurios, who lived in the late 7th and early 8th century and whom the Coptic biograph John the Deacon approvingly refers to as “the new Constantine”, the state seems to have been reorganized and Miaphysite Christianity to have become the official creed. He probably also founded the monumental Ghazali monastery (around 5000 m2) in Wadi Abu Dom. Zacharias, Merkurios' son and successor, renounced his claim to the throne and went into a monastery, but maintained the right to proclaim a successor. Within a few years there were