The area of the Abrantes Castle was at one time occupied by a Lusitanian castro structure. It was conquered during the Roman invasion of the peninsula around 130 BC by Consul Decimus Junius Brutus, and occupied for a time by Roman legions after Brutus expanded and remodelled it. Successive invasions by Alans (411), Visigoths (492) and Moors (716) further indicated the strategic importance of this site, justifying the establishment of a permanent military garrison. However, the area and its river did not constitute an important link between the settlements of the Iberian Peninsula until the 12th century.
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. He granted the lands to the Order of Santiago (1172) so that they could watch over and assist pilgrims on the Way of Saint James. 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. The castle outpost, as well as the castles of Almourol, Castelo Branco, Monsanto, Pombal, Tomar, Torres Novas and Zêzere formed a defensive barrier of garrisons along the middle course of the Tagus River.
As part of this line, Abrantes was able to resist the forces of the Almohad Caliphate under the command of Moroccan Abem Jacob (1179), who retreated after suffering many deaths. Abrantes was rewarded for its heroic resistance by receiving a foral in 1179 and was rebuilt. 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.