Its construction work began under King Sancho I, in Gothic style, and it is one of the best preserved castles in Portugal.
Its strategic importance comes from its geographical position in relation to Galicia. It received its charter in 1187, was invaded by D. Afonso IX of Leon in 1199, and then reconquered.
In its more than 800 years it has been the centre of external and internal conflicts and conquests.
As the settlement prospered and expanded, it gave rise to the construction of a second walled perimeter in 1293. The castle was finally “conquered” through the Treaty of Segovia in 1400 and its Keep was completed in 1439 during the reign of D. Duarte.
The Castle is classified as a National Monument since the 23rd of June of 1910. In 1930 restoration and preservation works began, and in 1936, the Military Museum, one of the most important and visited at national level, was installed there.