Lines of Torres Vedras
The Lines of Torres Vedras were lines of forts built in secrecy to defend Lisbon during the Peninsular War. Named after the nearby town of Torres Vedras, they were ordered by Arthur Wellesley, Viscount Wellington, constructed by Sir Richard Fletcher, 1st Baronet, and his Portuguese workers between November 1809 and September 1810, and used to stop Masséna's 1810 offensive.
After his troubling Spanish experience at the Battle of Talavera, Wellington realised that being outnumbered by the French forces, he may need to retreat to Portugal and possibly evacuate the peninsular, so decided to strengthen the proposed evacuation area around the fort at Oeiras e São Julião da Barra Portugal. He used a report of Colonel Vincent, ordered by Junot in 1807, describing the excellent defensive capacities in the region nearby Lisbon. It has been suggested that the study by Major Neves Costa influenced Wellington's decision to construct the lines, but in fact the plans pre-date Costa's study. He was also inspired by the Martello Towers along the English Channel coast. In October 1809 Wellington, after surveying the area personally with Lieutenant-Colonel Sir Richard Fletcher, ordered in his detailed memorandum dated 20 October 1809 the building of the Lines of Torres as a system of fortifications blockhouses, redoubts, ravelins, cuts of natural relief, etc. The work began on several of the main defensive works in November 1809.
When the results of Royal Engineer surveyors were gathered together, it was possible by February 1810 to begin works on 150 smaller interlinking defensive positions, using wherever possible the natural features of the landscape. The work received a boost after the loss of the fortress at the Siege of Almeida (1810) in August, with the public conscription of Portuguese labourers. The works were sufficiently complete when the French troops arrived in October to make them stop and fall back. Even after the French had retreated from Portugal, construction of the lines continued, and in 1812 34,000 men were still working on them.
The work was supervised by Lieutenant-Colonel Sir Richard Fletcher, assisted by Major John Thomas Jones, and 11 other British officers, four Portuguese Army engineers and two KGL officers. The cost was around £100,000 (close upon £200,000 per the Corps of Royal Engineers), one of the least expensive but most remunerative military investments in history.
The Anglo-Portuguese Army was forced to retreat to the lines after winning the Battle of Buçaco (27 September 1810). The French army under Marshal André Masséna discovered a barren land (under the scorched earth policy) and an enemy behind an impenetrable defensive position. Masséna's forces arrived at the lines on 11 October and took Sobral de Monte Agraço the following day. After driving in the Anglo-Portuguese skirmish line on 13 October, the VIII Corps tried to push forward on the 14th. In the Battle of Sobral they were repelled in an attempt to assault a strong British outpost.
After attempting to wait out the enemy, the lack of food and fodder, in the area north of the Lines, meant that Masséna was forced to order a French retreat northwards, starting on the night of 14/15 November 1810, to find an area that had not been subjected to the scorched earth policy.
In December, fearing a French attempt on the left of the Tagus a chain of redoubts were constructed, 17 in number, from Almada to Trafaria.  The French however made no movement, and still holding out, through February when starvation really set in, Marshal Masséna ordered, at the beginning of March 1811, a retreat, that took a month, to get to Spain.
Marshal Masséna began his campaign with his army (l'Armée de Portugal) at 65,000 strong. Losing 4,000 at the Battle of Buçaco he arrived at Torres Vedras with 61,000 men. When he eventually reached Spain, in April 1811, he had lost a further 21,000 men. One of the coldest winters the area had ever seen hit Portugal and killed many of the French forces. They had also been hit by starvation, severe illness and disease, killing the soldiers in their thousands. The human cost was also great for the local population, because of the privations they endured. It is estimated that between October 1810 and March 1811 about 50,000 Portuguese died of hunger or disease.
The Allies were reinforced by fresh British troops in 1811 and renewed their offensive. They left the lines, following the French retreat. The lines were not needed again for the rest of the Peninsular War.
The three lines of Torres Vedras had redoubts and forts strategically placed in the top of hills, controlling the roads to Lisbon and using the natural obstacles of the land. They did not comprise solid lines; instead, they formed groupings of heavily defended areas that were self-supporting, with mobile troops based in fortified camps ready to counterattack when necessary.
The first line, with an extension of 46 km, binds Alhandra to the estuary of the Sizandro River. The second line, 13 km to the south, has 39 km and binds the Póvoa de Santa Iria to Ribamar. The third line consisted of a defensive perimeter with 3 km, from Paço de Arcos to the Tower of Junqueira, protecting a beach of embarcation (St. Julian's) about 27 km to the south of the second line, to be protected by British marines.
Initially using the Lisbon Militia units plus 5,000 to 7,000 hired peasants and later by conscription of all people within 40 miles, supervised by 18 engineering officers and around 150 NCOs, and at a cost of just £100,000, the work was completed just in time.
Within a year, by the time the French arrived, 126 forts and redoubts were built, with ravelins, detached batteries, etc. Rivers were dammed, turning large areas into swamps; ravines were choked with abatis; miles of walls were built, some 16 ft high. Lateral roads were constructed to enable swift movement of supporting troops, houses and walls demolished to clear fields of fire, hills were scarped to make an unclimbable precipice, and everything was organised to have channels where crossfire from artillery would decimate an attacking force.
The three lines were furnished with 247 pieces of artillery and provided with around 30,000 men, mainly Portuguese militia and home guard ordenanças, plus 8,000 Spanish troops and 2,500 British marines and artillerymen. This left the Regular army, of around 58,000 (being 24,000 Portuguese and 34,000 British), able to manoeuvre behind the first line, to points of danger depending on where the invaders attacked the lines.
The majority of the defences were redoubts holding 200 to 300 troops and 3 to 6 cannon, normally 12 pounders which could fire canister shot or round shot. The redoubt was protected by a ditch, normally 16 ft wide and 12 ft deep, with parapets 8 to 14 ft thick fitted with fire steps and the redoubts were pallisaded.
A possible eastern approach down the Tagus was protected with anchored gun boats.
The fourth line was built south of the Tagus in the Almada highs to hinder an eventual invasion coming from south, with an extension of 8,000 yards (7.3 km): It had 17 redoubts and covered trenches, 86 pieces of artillery, defended by marines, and orderlies of Lisbon, for a total of 7,500 men.
Work continued on the redoubts and 152 were eventually completed.
The works were divided up into districts by Wellington in letter dated 6 October 1810 
- From Torres Vedras to the sea. HQ at Torres Vedras
- From Sobral de Monte Agraço to the valley of Calhandrix. HQ at Sobral de Monte Agraço
- From Alhandra to the valley of Calhandrix. HQ at Alhandra
- From the banks of the Tagus, near Alverca, to the Pass of Bucellas, inclusive. HQ at Bucellas
- From the Pass of Freixal, near Bucellas, inclusive, to the right of the Pass of Mafra. HQ at Montachique
- From the Pass of Mafra to the sea. HQ at Mafra
Each district was allocated one Captain and one Lieutenant of Engineers. 
Substantial portions of the lines survive today, albeit in a heavily decayed condition due to locals re-using 100,000 tons of stones. Some conservation and restoration work has been undertaken in recent years using EC funding. This work was awarded the European Union Prize for Cultural Heritage / Europa Nostra Award for this conservation work in 2014.
Efficiency and cohesion
The efficiency and cohesion of the lines was based on five points:
1) Redoubts of artillery with Portuguese artillerymen, commanded by Major-General José António Rosa, and situated to fire into preset zones, where the enemy attack was expected. Both lines extended more than 80 km. The first line had 534 artillery pieces.
2) Military roads to cover the rear of the lines and allowing an extraordinary mobility of forces. It allowed for the supply of combat supplies (ammunition, rations and water) to be provided by the Royal Waggon Train. In September 1810, the field army had some 66,598 regular soldiers. Including the Ordenanças and Milicias, it had 77,690 men.
- Redoubt n.30 close to the ocean (Ponte do Rol)...
- Forte de São Vicente de Torres Vedras
- Monte do Socorro close to Pêro Negro, Wellington’s headquarters. The station was reconstructed in 2008.
- Monte Agraço
- Sobralinho, by the Tejo.
4) Secrecy. The building of the lines took, surprisingly, only 10 to 11 months. Lisbon became a peninsula defended by a most efficient system of blockhouses. Everything was preserved as a secret, whose maintenance is as surprising as the building of the lines. Only one report appeared in the London newspapers, a major source of information for Napoleon. It is said that when Masséna was first confronted by the Lines, he asked his staff why they had not known about them in advance. "Wellington has made them", replied someone. Masséna shouted, "To the Devil with you! Did Wellington make the mountains?" It is also said that not even the British government knew about the forts and was stunned when Wellington first said in despatches he had retreated to them.
5) The scorched earth policy. North of the lines everything that could supply the invading army was collected, hidden or burnt. A vast tract of land was deserted and perhaps 200,000 inhabitants of the neighbouring districts of the lines were relocated inside the lines. That the French were able to campaign in their vicinity at all was a remarkable feat, according to Wellington:
|“||It is certainly astonishing that the enemy have been able to remain in this country so long; and it is an extraordinary instance of what a French army can do. ...They brought no provisions with them, and they have not received even a letter since they entered Portugal. With all our money, and having in our favour the good inclinations of the country, I assure you that I could not maintain one division in the district in which they have maintained not less than 60,000 men...for more than two months.||”|
- The Lines of Torres Vedras: The Cornerstone of Wellington's Strategy in the Peninsular War 1809-1812, John Grehan, Spellmount
- Maj Gen Porter. History of the Corps of Royal Engineers Vol I Chapter XI.
- Maj Gen Porter. History of the Corps of Royal Engineers Vol I page 266.
- The lines of Torres Vedras. A.H. Norris and R.W. Bremner 1980
- Maj Gen Porter. History of the Corps of Royal Engineers Vol I page 265.
- Gates, p.237-238
- Trench warfare
- Death to the French, novel by C. S. Forester
- Sharpe's Gold (novel), novel by Bernard Cornwell
- Sharpe's Escape (novel), novel by Bernard Cornwell
- Lines of Wellington, film by Raúl Ruiz and Valeria Sarmiento
- A.H. Norris and R.W. Bremner: The lines of Torres Vedras. The first three lines and fortifications south of the Tagus. The British Historical Soc. of Portugal, Lisbon 1980.
- Ian C. Robertson: Wellington at War in the Peninsula 1808-1814: An overview and guide. Barnsley, South Yorkshire 2000.
- Eyewitness report in: Ruthard von Frankenberg: Im Schwarzen Korps bis Waterloo. Memoiren des Majors Erdmann von Frankenberg. edition von frankenberg, Hamburg 2015, ISBN 978-3-00-048000-3. pp. 68–73