Damascus, an oasis city at the edge of the Syrian desert, is among the oldest continuously inhabited places on earth. It was the capital of the Umayyad Caliphate from 661 to 750, when Muslim rule stretched from Spain to the Indus, and its Umayyad Mosque, completed about 715, remains one of the great monuments of Islam.
After the Abbasid Caliphate moved the center of power to Baghdad, Damascus was a provincial city contested by rival dynasties. It recovered in the twelfth century as a base of resistance to the Crusades: Nur al-Din and then Saladin, who is buried there, made it a capital and endowed colleges and the famous Nuri hospital, a model of Medicine in the Islamic World. Under the Mamluk Sultanate of Egypt it was the second city of the realm after Cairo. Its madrasas attracted jurists and hadith scholars, and its Sufi circles produced the poet 'A'ishah al-Ba'uniyyah. Its workshops were renowned for patterned silks ('damask'), inlaid metalwork and fine steel blades, and pilgrim caravans gathered there each year for the Hajj.
The Mongols occupied the city briefly in 1260 before their defeat at the Battle of Ain Jalut. In 1400–1401 Timur (Tamerlane) sacked it and deported its artisans to Samarkand; Ibn Khaldun met the conqueror outside the walls. The Ottomans took Damascus in 1516.