[4][3] During the Christian Reconquista (English: Re-conquest), the settlement in the area of Abrantes was taken from the Moors by forces in the service of Afonso Henriques (1112-1185), who restructured the defences of the site to attract settlers into the region.
Later, it was incorporated into the Linha do Tejo (English: Tagus Line) that the Knights Templar established to control and maintain the lands reconquered from the Muslims.
[3] During the reign of Sancho I (1185-1211), a new attack from the Almoáda, under the command of Caliph Abu Yusuf Ya'qub al-Mansur, was successful in 1191 in retaking all the Christian conquests in the territories south of the Tagus, with the exception of Évora.
[3] In 1250, Afonso III (1248-1279) initiated a strengthening of the defences of the castle, including the construction of the prison block and an expansion of the walls, which was brought to completion between 1300 and 1303 in the reign of his successor Dinis.
In the context of the Portuguese Restoration War, in the last quarter of the 17th century, Peter II determined that the castle and its settlement should be reconstructed into a medieval castle-keep, in the style of Vauban.
By the beginning of the 19th century, during the Peninsular War the castle and town underwent, on two occasions, the passage of Napoleonic troops into Portugal: In 1809, the fortifications were improved under engineer Manuel de Sousa Ramos, just before they were occupied by Masséna's forces, who destroyed the palace of the Marquess of Abrantes.
[1] At the end of the 1960s, remodelling projects were advanced to consolidate and restore the walls of the castle, which continued until the 1970s (and included the partial reconstruction of the detention block).
The only remnants of the austere medieval castle are the detention block, the weapons portico (on the north-east angle) and the parapet for lookouts that commanded panoramic views of the region.
The Paços, marked by grandiose architectural elements in the Baroque style, was substantially modified in the 18th century by the first Marquis of Abrantes, Rodrigo Anes de Sá Almeida e Menezes.
In the interior, the Church of Santa Maria do Castelo, in the Gothic style has been converted into a museum exhibiting a collection of Roman sculpture, funerary artefacts from the 15th and 16th century, as well as azulejos.