Pre-Islam
Excavations in the old city suggest that Jeddah was founded as a fishing hamlet in 500 BC by the Yemeni Quda'a tribe, who left central Yemen to settle in Makkah after the destruction of the Marib Dam in Yemen.
Other archaeological studies have shown that the area was settled earlier by people in the Stone Age, as some Thamudi scripts were excavated in Wadi Briman, west of the city, and Wadi Boweb, northwest of the city. It was visited by Alexander The Great (356 BC - 323 BC).
Rashidun Caliphate
Jeddah first achieved prominence in 647 AD, when the third Muslim Caliph, Uthman Ibn Affan, turned it into a port for Muslim pilgrims making the required Hajj to Mecca.
Since then, Jeddah has been established as the main city of the historic Hejaz province and a historic port for pilgrims arriving by sea to perform their Hajj pilgrimage in Mecca. The city's strategic location as the gates of the Holy City and a port on the Red Sea has caused it to be conquered many times throughout its history.
Fatimid Caliphate
In the 969 AD the Fatimids from Algeria took control in Egypt from the Ikhshidid dynasty and expanded their empire to the surrounding regions, including Hejaz and Jeddah. The Fatimids developed an extensive trade network in both the Mediterranean and the Indian Ocean through the Red Sea. Their trade and diplomatic ties extended all the way to China and its Song Dynasty, which eventually determined the economic course of Hijaz during the High Middle Ages.
Ayyubid Empire
After Saladin's conquest of Jerusalem, in 1171 he proclaimed himself sultan of Egypt, after dissolving the Fatimid Caliphate upon the death of al-Adid, thus establishing the Ayyubid dynasty, which set conquests throughout the region. Hejaz—including Jeddah—became a part of the Ayyubid Empire in 1177 during the leadership of Sharif Ibn Abul-Hashim Al-Thalab (1094–1201). During their relatively