The Palace of the Golden Gate or Palace of the Green Dome was the official caliphal residence in Baghdad during the early Abbasid Caliphate. Baghdad was founded in 762 by the second Abbasid caliph, al-Mansur. The main part of the original city was the Round City, with the Palace of the Golden Gate and the adjacent Great Mosque of al-Mansur at its centre. Apart from the mosque, no other buildings were allowed to be built close to the palace, which was thus surrounded by a wide space; only on the northwest, towards the Gate of Syria, two buildings were constructed next to the palace wall: a barracks for the Caliph's horse guard, and a two-part gallery, originally intended as an audience hall for the sahib al-shurta and the captain of the horse guard respectively, but later came to be used as a public prayer space. Around this wide open space, the palaces of al-Mansur's younger children, quarters for the palace servants, and the offices of the various administrative departments were built. The palace originally occupied an area of, with a central building topped by a green dome, high, which gave the palace its alternative name of al-Qubbat al-Khaḍrāʾ. At the top of the dome was the effigy of a horseman carrying a lance, who in later times was credited with magical properties: he would allegedly turn his lance towards the direction where enemies were approaching from. Underneath the dome was a square audience chamber, with a vaulted ceiling just as high; and above that, in the interior of the dome, was another chamber of similar dimensions. In front of the audience chamber was an alcove, called the aywan, which was surmounted by an arch high and wide. The palace and mosque appear to have been completed in 763, one year after construction began, allowing al-Mansur to take up residence in the city. While the Palace of the Golden Gate remained the official residence of the caliphs, al-Mansur and his successors also spent much time in the nearby Khuld Palace constructed soon afterwards. Harun al-Rashid is said to have particularly preferred Khuld over the older palace, but his son al-Amin restored it as his residence, added a new wing to it, as well as a large square. As the main stronghold of al-Amin and his partisans, it suffered extensive damage from bombardment by catapult during the Siege of Baghdad. The palace then ceased to be used as a royal residence, and became neglected. The palace remained standing, however; part of the structure was torn down to facilitate the expansion of the nearby Great Mosque under al-Mu'tadid, but the landmark Green Dome remained standing until the night of 9 March 941, when heavy rainfalls, and possibly a thunderbolt strike, led to the collapse of the dome. The walls of the dome survived until the Sack of Baghdad by the Mongols in 1258.