and destroyed the city. This door was then installed at the Bāb al-'Āmma, the main entrance to the caliph al-Mu'tasim's newly-built palace. This door then supposedly found its way to Raqqa sometime later during the 9th century, before then being removed in 964 by Sayf al-Dawla, the Hamdanid ruler of Aleppo, to renovate the Bāb Qinnasrīn in his capital. It was then destroyed when the Mongols captured Aleppo in 1260, and its fragments were then taken by the Mamluk sultan Baibars to the citadels of Damascus and Cairo. Al-Rafiqah itself was laid out on a north-south axis, roughly aligned with the qibla. A major north-south street connected the Bab Harran in the north with al-Rafiqah's Great Mosque, right at the center of the walled city. The mosque is 108x93m, about the same size as the Abbasid mosque built at Baghdad a decade earlier. However, its materials are more sophisticated: whereas the Baghdad mosque was originally made from mud bricks with wooden columns and ceiling, the al-Rafiqah mosque is entirely made out of kiln-fired bricks. The roof of al-Rafiqah's mosque was also gabled, in contrast with the flat-roofed Baghdad mosque, showing an influence from earlier Umayyad mosque architecture in Syria, such as the Great Mosque of Damascus. The al-Rafiqah mosque was renovated in 1165-6 by Nur ad-Din Mahmud Zengi, but an archaeological sounding revealed that this renovation did not change the basic structure, so its origins can be firmly dated to the Abbasid period. The al-Rafiqah mosque represents an important step in the history of mosque architecture. Earlier mosques had mostly been repurposed from earlier pre-Muslim structures, like the Great Mosque of Damascus, or featured a very rudimentary design, such as the original mosque at Baghdad. The al-Rafiqah mosque was the first to be built entirely from scratch on a coherent plan. It had an important influence on later mosque architecture, beginning in 808 when Harun al-Rashid – who was living in Raqqa at the time and would have been familiar with the al-Rafiqah mosque – had the original mosque at Baghdad rebuilt, adopting features of the design at al-Rafiqah. Later mosques such as the Great Mosque of Samarra and the Mosque of Ibn Tulun in Cairo also contain traces of its influence. Al-Muhtariqa Between Raqqa and al-Rafiqah was a large commercial and industrial area, which was called "al-Raqqa al-Muḥtariqa", or "the burning Raqqa", probably because of all the thick smoke