It was one of the first and one of the largest of 152 military works known as the Lines of Torres Vedras that were built in 1809-10 to defend Lisbon during the Peninsular War (1807–14).
Following the Treaty of Fontainebleau signed between France and Spain in October 1807, which provided for the invasion and subsequent division of Portuguese territory into three kingdoms, French troops under the command of General Junot entered Portugal, which requested support from the British.
Masséna’s troops were gathered around Sobral de Monte Agraço but he found the line of defences, centered on the Fort of Alqueidão, to be impregnable.
[1][5] The fort is at 439 meters above sea level, on top of the Monte Agraço mountain range, and occupies an area of 3.5 hectares.
[6] It was part of a group of seven forts and redoubts in the 2nd section or district of the first of the Lines of Torres Vedras and designated No.
[8][10] As part of a programme of restoration to celebrate the bicentennial of the Lines, archaeological exploration was carried out between 2008 and 2011, using EEA and Norway Grants.
The archaeological studies not only added to the understanding of the construction techniques used but also discovered that the site had been first occupied during the Iron Age.