This forms part of the city wall built during the reign of Abd al-Azid at the beginning of XI century, when the city became the capital of a kingdom of Taifa and underwent enormous expansion.