The power of the Patriarch of Constantinople increased with the Ottoman–Mamluk War (1516–1517) and the consequent annexation of Syria, Palestine and Egypt by Sultan Selim I, as the Patriarchates of Alexandria, Antioch and Jerusalem were incorporated to Ottoman Empire. These patriarchates retained their religious autonomy, but were "de facto" subjected to the influence of the Patriarch of Constantinople, who was near the Sultan and was his deputy as civil ruler of all Eastern Orthodox Christians in the Empire in accordance with the millet system. This influence of Constantinople increased during the next centuries, especially with regards to appointments. With the conquest of Palestine and the fall of Jerusalem in 1517 to Selim, Theoleptus obtained from the Sultan the right to maintain the Church of the Holy Sepulchre.