Transformation of the Ottoman Empire
Sultan Suleiman I (r. 1520–1566) was the longest-reigning sultan in Ottoman history, but the last years of his reign were characterized by uncertainty over who would be his successor. Suleiman had three sons who could hope to succeed, Mustafa, Bayezid, and Selim. While the latter two were the children of Suleiman's wife Hurrem Sultan, the first was the son of an earlier concubine. Mustafa may have felt that his half-brothers possessed an unfair advantage over him, and thus worked to secure the favor of the military. Perhaps suspecting that Mustafa planned to dethrone him just as his own father had done to his grandfather, Suleiman acted first and in 1553 ordered that Mustafa be executed. The death of Hurrem Sultan in 1558 triggered open conflict between the two remaining candidates, and Selim ultimately emerged victorious. Suleiman further strengthened his son's position by arranging a marriage between Selim's daughter and the influential Sokollu Mehmed Pasha (Grand Vizier 1565–1579). Suleiman died in 1566, while besieging the fortress of Szigetvar in Hungary, bringing Selim to the throne.
Selim I
Selim then conquered the Mamluk Sultanate of Egypt, defeating the Mamluk Egyptians first at the Battle of Marj Dabiq, and then at the Battle of Ridanieh. 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 him 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".