The Medina of Monastir is within a walled enclosure. Even today much of the original walls remain intact, especially on the western side (opposite the public gardens), and in the vicinity of the Ribat of Harthama. The Aghlabids started building it in the ninth century and it was completed in the eleventh century. Several renovations including the addition of octagonal corner towers were made in the seventeenth century. Some of the doors in the walls have also been conserved (Bab el-Gharbi, Bab Tunis, Bab el-Kram and Bab Briqcha) and enter to the medina.