Although the first documentary references date back to the year 1040, recent archaeological excavations show that this area was occupied from the start of the Iron Age. Numerous remains have been found from the late Roman era (3rd to 5th centuries AD), such as blades, pieces from manual mills, ceramics, etc.
During the Middle Ages, particularly during the 11th and 12th centuries, the area grew in importance, as it was a valuable defensive enclave of the Navarre Kingdom, since it dominated the roads from the Ebro towards the valleys of the Ayuda and Inglares rivers.
In the 13th century it became part of the Castile Kingdom and its border was displaced eastwards, causing the region to gradually lose importance as its inhabitants moved away to new areas, such as Portilla or the new town of Berantevilla, which had better lands for cultivation thanks to their location in the Ayuda valley.
The constructions of Portilla comprised the castle and the mediaeval town Portilla de Ibda. Both the fortification and the town itself was practically uninhabited in the 15th century, and was only occupied from then on during times of armed conflict. The castle contained in the shield of Álava is that of Portilla.