Custodian of the Two Holy Mosques
Custodian of the Two Holy Mosques, Servant of the Two Noble Sanctuaries or Protector of the Two Holy Cities, is a royal style that has been used by many Muslim rulers, including the Ayyubids, the Mamluk Sultans of Egypt, the Ottoman Sultans, and in the modern age, Saudi Arabian kings. The title was sometimes regarded to denote the de facto Caliph of Islam, but it mainly refers to the ruler taking the responsibility of guarding and maintaining the two holiest mosques in Islam: Al-Haram Mosque in Mecca and the Prophet's Mosque in Medina, both of which are in the Hejazi region of the Arabian Peninsula.History
It is believed that the first person to use the title was Saladin of the Ayyubid dynasty.
After defeating the Mamluks and gaining control of the Mecca and Medina in 1517, the Ottoman Sultan Selim I adopted the title. Rather than style himself the Ḥākimü'l-Ḥaremeyn, he accepted the title Ḫādimü'l-Ḥaremeyn. This title was used by all subsequent Ottoman Caliph Sultans until Mehmed VI, the last.
The first King of Saudi Arabia to assume the title was Faisal bin Abdul Aziz. His successor Khalid did not use the title, but the latter's successor Fahd did, replacing the term "His Majesty" with it. The current king, Salman bin Abdulaziz Al Saud, took the same title after the death of King Abdullah, his half brother, on 23 January 2015.