King D. Dinis ordered the first wall to be built in 1306. The foundation stone was laid by Pero Lourenço do Rego on St. Michael's Day of that year and after 1309 the Order of Avis gave the final push to the construction work.
The Old Town of Olivenza reproduces the original structure of the bastides: a rectangular area with four doors, divided by two perpendicular streets that intersect in the centre. The entire complex projects emblematically in an east-west direction against the border.
With walls 3 m. wide and 12 m. high, the complex had a total of 14 towers; an albarrana tower on the most exposed angle. At each side there was a door, fortified with solid towers. Two of them are preserved: Alconchel and Los Angeles, with semi-circular towers. The Puerta de la Gracia only retains the arch, having lost its square-based towers. The old San Sebastian Gate, on the north side, was demolished by a proposal made on 25 January 1854, before the Plenary Council, given its imminent state of ruin. Since 2005 it has been rebuilt.