sack by Castilian forces in 1373, and blockade of the port in 1382 and 1384, Cascais continued to grow beyond its walls. By the end of the 14th century this resulted in the creation of the parishes of Santa Maria de Cascais, São Vicente de Alcabideche and São Domingos de Rana. From the Middle Ages onward, Cascais depended on fishing, maritime commerce (it was a stop for ships sailing to Lisbon), and agriculture, producing wine, olive oil, cereals, and fruits. Due to its location at the mouth of the Tagus estuary, it was also seen as a strategic post in the defence of Lisbon. Around 1488, King John II built a small fortress in the town, situated by the sea. On 15 November 1514, Manuel I conceded a foral (charter) to Cascais, instituting the region's municipal authority. It was followed on 11 June 1551 by a license from King John III to institutionalise the Santa Casa da Misericórdia de Cascais. The Mother Church of Cascais, the Church of Nossa Senhora da Assunção, dates back to the early 16th century. The town's medieval fortress was inadequate to repel invasions, and in 1580 Spanish troops led by the Duque of Alba took the village during the conflict that led to the union of the Portuguese and Spanish crowns. The fortress was enlarged towards the end of the 16th century by King Philip I (Philip II of Spain), turning it into a typical Renaissance citadel with the characteristic flat profile and star-shaped floorplan. Following the Portuguese restoration in 1640, a dozen bulwarks and redoubts were constructed under the direction of the Count of Cantanhede, who oversaw the defences of the Tagus estuary, the gateway to the city of Lisbon. Of these structures, the citadel of Cascais, which was constructed alongside the fortress of Our Lady of Light, considerably reinforced the strategic defences of the coast. In 1755, the great Lisbon earthquake destroyed a large portion of the city. Around 1774, the Marquis of Pombal, prime-minister of King José I, took protective measures for the commercialisation of the wine of Carcavelos and established the Royal Factory of Wool in the village, which existed until the early 19th century. During the invasion of Portugal by Napoleonic troops in 1807, the citadel of Cascais was occupied by the French, with General Junot staying some time in the village. In 1862, the Visconde da Luz built a