The managing body of the hill's monuments describes it as the castle most connected with the origins of the country, and tradition places the birth of Afonso Henriques within its walls. Its walls trace a shield-like outline around a small yard, with eight rectangular towers and a central keep.
The first castle was ordered in the 10th century by Countess Mumadona Dias to protect a monastery she had founded below, on the site now occupied by the Collegiate Church of Nossa Senhora da Oliveira; a codicil of 4 December 968 already mentions it, under the name Castle of São Mamede, as newly built to shelter the friars and nuns. At the end of the 11th century Count Henry rebuilt and enlarged it as his residence, and some rows of large ashlar blocks near the entrance survive from that work. The Battle of São Mamede of 1128, named after the fields where it took place, began the independence of Portucale, the core of the future Portugal.
What stands today is largely the castle remodelled by King Denis between the late 13th and early 14th centuries, which added the keep and residential quarters in an early Gothic manner; the two towers flanking the main gate were built on the orders of John I. The garrison held out against Henry II of Castile in 1369. Afterwards the fortress slowly decayed, served as a political prison under King Miguel, and in 1836 town councillors even proposed tearing it down to pave the streets, a plan that was never carried out. Declared a national monument in 1910, it was restored by the state and reopened on 4 June 1940; during later works a medieval well came to light.
The castle shares the Monte Latito with two other national monuments, and visitors usually see the three together. Just down the slope is the Romanesque church of S. Miguel do Castelo, traditionally linked to the baptism of D. Afonso Henriques. Nearby rises the Paço dos Duques, the palace built for D. Afonso, 8th Count of Barcelos, who later became Duque de Bragança, a natural son of King John I. Beside the southern tower of the castle, a bronze medallion of D. Afonso Henriques is set on a large rock, and stretches of the old town wall that once joined the castle still survive on the hillside.




