The Castle of Elvas dates from the reign of D. Sancho II, although it underwent important extensions in the following reign. It rests on a Muslim structure, of which two wall girdles are still preserved. The city was taken from the Moors, successively in 1166 and 1220, and only definitively in 1226, the castle was immediately rebuilt and completed in 1228.
During the reign of D. Dinis, some innovations were introduced in terms of roofs and other support elements, such as turrets and “matacães”. In the following centuries, D. João II and D. Manuel I adapted the castle towards a new bastioned system, of Renaissance taste, at the same time that the whole set took on a more residential character, in charge of the city mayors. Overcoming the entrance doors, we found the stone of arms of D. João II, dating this constructive campaign.
In the 17th century, the time of military reform, the Castle of Elvas became one of the most notable bastioned buildings in Europe, due to the urgency of defense in the midst of the border wars (1641-1668). The fortification work fell to the engineer Padre Cosmander and other masters, for that purpose called to the Portuguese court by D. João IV and D. Afonso VI. Of note in this campaign is the complex system of walls, revelins, moats, as well as two secondary fortresses, Santa Luzia and Graça.
Despite the great transformations undergone throughout history, the Castle of Elvas maintains its medieval military structure and is recognized as one of the most important cases of overlapping functions and the evolution of strategic-military conceptions throughout Portuguese history.