Badajoz was founded by Abd-al Rahman Ibn Marwan in 875.
The current line of walls date mostly from the Almohad age, although there are traces of earlier work from 913 and 1030; in 1169 the Almohad caliph Abu Yaqub Yusuf rebuilt the fortress, giving it its current appearance.