The gates set in Jeddah's historic wall were once the main points of entry for pilgrims, merchants, caravans and goods. They controlled who and what came in and out as the city rose in importance, both as the port receiving pilgrims on their way to Makkah and as a busy trading center on the Red Sea and Indian Ocean routes.

The wall was built to guard the city against threats by land and sea. It was strengthened with towers and defensive works and ringed by a moat. At first it had seven gates, among them Bab Makkah, Bab Sharif and Bab Al-Madinah, the last of which opened onto the road to Madinah.

As trade grew and means of transport changed, a further entrance called Bab Jadid was added to let vehicles through, raising the number of gates to eight.

The wall was taken down in 1947 as Jeddah expanded. Some of its gates survived, however, notably Bab Makkah and Bab Jadid, which remain as reminders of the old city's entrances once used by pilgrims and traders, and as landmarks remembered in its historic neighborhoods and traditional markets.