Mecca
After 1350 the Mamluks made the Hejaz a regular province of their empire and kept the sharifs of the house of Qatada in check by playing one against another. Their base on the coast was Jeddah, which replaced Yanbu as the chief port of the Hejaz, and pilgrims arriving by sea landed there for the last stage to Mecca. In 1517 a Portuguese fleet even appeared off Jeddah before the shore guns drove it away, and that same year the Mamluk sultanate fell to the Ottomans. Sharif Barakat acknowledged the Ottoman sultan as caliph and was confirmed in his rule, and the sultans, now styling themselves Custodians of the Two Holy Sanctuaries, left real power in the city with the sharifs.
The arrangement held until a new force rose in the Najd. The Wahhabi Saudis took Mecca in 1803, deposed Sharif Ghalib and destroyed some of the historic tombs and domes in and around the city, letting Ghalib return only as their vassal. In 1813 Muhammad Ali Pasha, viceroy of Egypt, retook Mecca for the Ottomans.