The building of Bab Agnaou is attributed to the Almohad caliph Abu Yusuf Ya’qub al-Mansur and it was completed between 1188 and 1190. This gate was the main public entrance to the royal kasbah, located in the southern part of the medina, and one of just two gateways into the kasbah that still stand.
Interestingly, the function of the gate was purely decorative. Because of its location, which is already inside the city walls, the gate served no defensive purpose. However, the gate was still originally flanked by two bastion towers.
The gate has preserved its beautiful stone-carved decoration from the Almohad period, although due to pollution that is slowly damaging the stone, it is under threat. The original arch of the gate is decorated with alternating semi-circular bands which alternate between radiating lines and interlacing arches. These decorative features are in turn framed by a long frieze carved with an inscription from the Quran. There is an inscription on the gateway that reads “Enter with blessing, serene people.”
The top of the gate is also famous as a nesting site for storks. The long-legged birds can be found throughout the city of Marrakech, with large nests on roofs and ramparts.