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.
Ottoman dynasty
The Ottoman claim to caliphate was strengthened when they defeated the Mamluks in 1517 and annexed Egypt during the rule of Selim I. Selim also received the title "Custodian of the Two Noble Sanctuaries", "Khadim al-Haramayn ash-Sharifayn" in Arabic, from Barakat Effendi Grand Sharif of Mecca when conquering Hijaz and with it the Muslim Holy Cities of Mecca and Medina. Selim I full style was: "Sovereign of the House of Osman, Khan of Khans of the Two Lands and the Two Seas, Commander of the Faithful and Successor of the Prophet of the Lord of the Universe, Custodian of the Two Noble Sanctuaries, Emperor of the Three Cities of Constantinople, Adrianople and Bursa, Conqueror of the two Armies" (i.e. the European and Persian armies).