The gate's outer entrance is flanked on either side by square bastions. The gate's passage originally consisted of a bent entrance which effected a single 90-degree turn; one entered the gate from the north and then exited westwards into the city.[1][2] According to legend, the door leaves of the gate were brought from Spain by a victorious Yusuf ibn Tashfin.[3][1] During the Almohad period, the gatehouse was expanded such that its passage effected three more right-angle turns before exiting southwards. This gave it a similar form and layout to several other major Almohad gates such as Bab er-Rouah.[3] The outline of the gate's original exit, now walled-up, can still be seen in its interior western wall.[3] The gate underwent a significant renovation in 1803-04 on the orders of Sultan Moulay Slimane, noted by a marble inscription found inside.[1][3] At some point in the 20th century, the inner wall of the passage was opened up to allow a straight passage directly through the gate in order to facilitate the heavy traffic in the area, resulting in the current form of the gate.[1]