Selim then conquered the Mamluk Sultanate of Egypt, defeating the Mamluk Egyptians first at the Battle of Marj Dabiq (24 August 1516), and then at the Battle of Ridanieh (22 January 1517).
This led to the Ottoman annexation of the entire sultanate, from Syria and Palestine in Sham, to Hejaz and Tihamah in the Arabian Peninsula, and ultimately Egypt itself.
This permitted Selim to extend Ottoman power to the Muslim holy cities of Mecca and Medina, hitherto under Egyptian rule.
Rather than style himself the Ḥākimü'l-Ḥaremeyn, or The Ruler of The Two Holy Cities, he accepted the more pious title Ḫādimü'l-Ḥaremeyn, or The Servant of The Two Holy Cities.

The last Abbasid caliph, al-Mutawakkil III, was residing in Cairo as a Mamluk puppet at the time of the Ottoman conquest.
He was subsequently sent into exile in Istanbul.
In the eighteenth century a story emerged claiming that he had officially transferred his title to the Caliphate to Selim at the time of the conquest.
In fact, Selim did not make any claim to exercise the sacred authority of the office of caliph, and the notion of an official transfer was a later invention.

After conquering Damascus in 1516, Selim ordered the restoration of the tomb of Ibn Arabi (d. 1240), a famous Sufi master who was highly revered among Ottoman Sufis.
Selim then conquered the Mamluk Sultanate of Egypt, defeating the Mamluk Egyptians first at the Battle of Marj Dabiq (24 August 1516), and then at the Battle of Ridanieh (22 January 1517). This led to the Ottoman annexation of the entire sultanate, from Syria and Palestine in Sham, to Hejaz and Tihamah in the Arabian Peninsula, and ultimately Egypt itself. This permitted Selim to extend Ottoman power to the Muslim holy cities of Mecca and Medina, hitherto under Egyptian rule. Rather than style himself the Ḥākimü'l-Ḥaremeyn, or The Ruler of The Two Holy Cities, he accepted the more pious title Ḫādimü'l-Ḥaremeyn, or The Servant of The Two Holy Cities.
The last Abbasid caliph, al-Mutawakkil III, was residing in Cairo as a Mamluk puppet at the time of the Ottoman conquest. He was subsequently sent into exile in Istanbul. In the eighteenth century a story emerged claiming that he had officially transferred his title to the Caliphate to Selim at the time of the conquest. In fact, Selim did not make any claim to exercise the sacred authority of the office of caliph, and the notion of an official transfer was a later invention.
After conquering Damascus in 1516, Selim ordered the restoration of the tomb of Ibn Arabi (d. 1240), a famous Sufi master who was highly revered among Ottoman Sufis.
Selim I