These date back to the 12th century during the Almoravid period but many have them have been modified since.[32][6] Bab Doukkala (in the northwestern part of the city wall) is in general more massive but less ornamented than the other gates; it takes its name from Doukkala area on the Atlantic coast, well to the north of Marrakesh.[33] Bab el-Khemis is in the medina's northeastern corner and is named for the open-air Thursday market (Souq el Khemis).[6][32] It is one of the city's main gates and features a man-made spring.[34] Bab ad-Debbagh, to the east, has one of the most complex layouts of any gate, with an interior passage that turns multiple times.[32] Bab Aylan is located slightly further south of it.[32] Bab Aghmat is one of the city's main southern gates, located east of the Jewish and Muslim cemeteries and near the tomb of Ali ibn Yusuf.[35] Bab er Robb is the other main southern exit from the city, located near Bab Agnaou.