The Romans first occupied the site, then the remnants of a local castro around the 2nd century, and transformed it into a defensible military fortification and politico-administrative center.[1]
The site was conquered in the 11th century by Ferdinand, King of León, but held for little time. It was definitively occupied in 1249 by D. Paio Peres Correia.[1] Several years later (1268) Afonso III had the area populated after reconstructing and expanding the walls.[1] During this period two of the main towers, including the keep tower, were constructed, but the six gates suggest the existence of other towers (only ruins remain).[1][2] A foral (charter) was issued in 1266 from Lisbon by Afonso III of Portugal.[1]
Between 9–12 April 1359, King Peter I overnighted at the alcadaria.[1]
In 1422 or 1462, Henrique de Meneses, 1st Count of Loulé re-built the towers and walls of the castle.[1]
The castle was damaged during an earthquake in 1969.[1]
The site was taken-over by the Instituto Português do Património Arquitetónico, on 1 June 1992, under Decree 106F/92 (Diário da Republic, Série IA, 126).[1] In 2001 a protocol was signed between the municipal council and the DGEMN in order to facilitate the protection and conservation of the patrimony in the municipality, that included the castle grounds.[1] This document was supplemented on 18 January 2013 (Diário da República, Série II, 13, Anúncio de Procedimento 232/2013) relative to the remodeling of the Praça D. Afonso III, Rua D. Paio Peres Correia and Largo das Bicas Velhas (Chafariz).[1]
Architecture
The remains of the castle and walls are visible from the roads Rua da D. Paio Peres Correia, Rua das Bicas Velhas, Rua da Barbacã and Largo D. Afonso III, as well as incorporated into the buildings.[1] The majority of the walls are integrated into the buildings of the growing city, outside the perimeter of the original walls.[1]