[1][2][3] Given its strategic importance, numerous enlargements to the castle were carried out immediately after the reconquest and throughout the Middle Ages.
In 1323 a second reinforcement of the walls was made and the West Tower was built, this being needed as a lookout to identify Barbary pirates.
[2][3] From the fifteenth century, the population gradually began to move down from the hills to settle by the bay and pursue fishing and boatbuilding activities.
The ramparts were reinforced in 1693 and other improvements made and, in 1721, the Church of Santa Maria do Castelo, which was built by Afonso I, was restored.
[2][3] The advanced state of ruin of the castle was not addressed until between 1933 and 1945, when conservation work was carried out by the Direção-Geral dos Edifícios e Monumentos Nacionais (DGEMN-General Directorate of Buildings and National Monuments).