The Fort of Cego is located in the municipality of Arruda dos Vinhos, in the Lisbon District of Portugal. It is also known as the Fort of Saint Sebastian (Portuguese: Forte de S. Sebastião). The fort was built in 1809-10 as part of the first of the three Lines of Torres Vedras, which were defensive lines to protect the Portuguese capital Lisbon from invasion by the French during the Peninsular War (1807-14) or, in the event of defeat, to safely embark a retreating British Army.