Sultan Tuman now resolved himself to march out as far as
Salahia, and meet with the Turks, weary by the desert journey, but yielded to his emirs who entrenched themselves at
Ridanieh, a little way out of the city. By this time, the Ottomans, having reached
Arish, were marching unopposed by Salahia and
Bilbeis to
Khanqah; and on January 20 reached
Birkat al-Hajj, a few hours from the capital. Two days later the main body confronted the Sultan’s Egyptian entrenchment; while another party that was crossing the Mocattam Hill took them on the flank. The
Battle of Ridanieh was fought January 22, 1517. Sultan Tuman fought along with a band of devoted followers; he threw himself into the midst of the Turkish ranks and reached even to Selim's tent. But in the end, the Egyptians were routed and retreated two miles (3km) up the
Nile. The Ottomans then entered Cairo unopposed. They took the
Citadel there and slew the entire Circassian garrison, while chaos reigned in the streets.
Selim himself occupied
Gezira Island (الجزيرة الوسطانية), close to
Bulaq. The following day his vizier entered the city, and endeavored to stop the wild rapine of the Turkish troops; and the Caliph
Al-Mutawakkil III, who had followed in Selim's train, led the public service invoking blessing on his name. The Caliph's prayer is thus given by
Ibn Ayas; :O Lord, uphold the Sultan, monarch both of land and the two seas; conqueror of both hosts; king of both Iraqs; minister of both holy cities; the great prince Selim Shah! Grant him your heavenly aid and glorious victories! O king of the present and the future, Lord of the Universe! Still plunder and riot went on. The
Turks seized all they could lay hold of and demanded their captives pay large ransoms to escape death.
Circassians were pursued and slaughtered, their heads being hung up around the battlefield. It was not till some days had passed that
Selim’s presence in the city, along with the Caliph, whose appeal for mercy began to be felt, put an end to the hostilities, and the inhabitants began to feel some measure of security again. The following night, Sultan Tuman reappeared in Cairo and with his
Bedouin allies took possession of the weakly garrisoned city, and at daylight they drove back the Ottomans with great loss. The approaches were entrenched, and the Friday service once more solemnized in the name of the
Egyptian
Sultan. But at midnight the Turkish invaders again returned with overpowering force and scattered the
Mamluks into their hiding places, while the Sultan fled across the Nile to Giza, and eventually found refuge in
Upper Egypt. Selim returned to Gezira and hoisted a red-and-white flag in token of amnesty over his tent. The
Mamluks, however, were excluded from it. A proclamation was made that anyone sheltering them would be put to death, and 800 were then discovered and beheaded. Many citizens were spared at the entreaty of the Caliph, who now occupied a more prominent place than ever under the Egyptian Sultanate. The son of Sultan
Al-Ashraf Qansuh al-Ghawri was received with distinction and granted the college founded by his father as a dwelling place. Soon after the initial amnesty, even the hidden emirs were given the chance to come forward and face Selim's wrath. However, they were not allowed to roam free and were instead placed in cells in the
Citadel. Emir Janberdi Al-Ghazali, who had fought at the
Battle of Ridanieh, cast himself at Selim's feet, was received with honor and even given a command to fight against the Bedouins. There is a great diversity of opinion as to when Janberdi, either openly or by collusion, took the Turkish side. The presumption is that he was faithful to the Sultan up to the
Battle of Ridanieh, and then deeming the cause hopeless retired and went over to the Ottomans about the end of January. Having strongly garrisoned the Citadel,
Selim now took up his residence there, and for security had a detachment quartered at the foot of the great entrance gate. == Guerrilla campaign from Giza ==