# Castle of Lagos

The Castle of Lagos is a medieval castle located in the municipality of Lagos, Portugal. Its walls surrounded the entire city of Lagos, providing the town its main means of defence.

## History
### Early history

Due to its strategic location, this stretch of coastline has been successively occupied since prehistoric times. In antiquity, the region was visited by Greek navigators, Phoenicians and Carthaginians. When the Romans arrived in the Iberian Peninsula, the primitive village had the Latinized name of Lacóbriga (also written Laccobriga). The new settlement received a quadrangular wall for its defence. The town of Lagos was occupied by Visigoths and later on, in the eight century, by Muslim Moors from North Africa, who renamed the town as 'Zawiya'.
Abd-ar-Rahman III, Caliph of Cordoba, conquered the town in 929 and provided it with towers. The size of these works reflected the economic and strategic importance the town enjoyed, which had a privileged access to Muslim Silves.

### Middle Ages

During the Christian reconquest of the Iberian peninsula, Lagos was surrendered to King Sancho I in 1189 after the fall of Silves. Almohad Caliph Abu Yusuf Yaqub al-Mansur reconquered the place in 1191, only to be retaken in 1241 by Paio Peres Correia.
From this time there is little reliable information regarding the town's defences under Muslim rule. King Afonso III (1248–1279) began works on the city's walls, which were continued by King Denis (1279–1325) and his successor Afonso IV (1325–1357).
From 1361 onwards, the town of Lagos was separated from the jurisdiction of Silves, reaching administrative independence.
In the context of the Portuguese discoveries, Lagos played an important role. Nearby Sagres was one of the support bases for the conquest of North Africa and the operations of Henry the Navigator (1394–1460), in the first phases of the Age of Discoveries. Due to its harbour, as well as facilities where Caravels and other vessels were built, Lagos played a crucial role in the rise of the Portuguese Empire.
From Lagos left:
* 1415 - Portuguese expeditions to conquer Ceuta in North of Africa;
* 1419 - Vessels for the discovery of Madeira;
* 1427 - Vessels for the discovery of the Azores;
* 1434 - Gil Eanes vessel that crossed Cape Bojador on the West African coast;
* 1458 and 1472 - The expeditions of King Afonso V (1438–1481) to conquer Ksar es-Seghir, Asilah and Tangier in the North of Africa. Despite Lagos's strategic importance, in 1475 the Court registered complaints regarding the poor conditions of the Algarve's fortifications, including the one in Lagos, after which reconstruction works began throughout the region.

### Later Middle Ages

With the reign of King John II (1481–1495), the Company of Guinea was moved from Lagos to new premises in Lisbon (1481–1482). King John II and his successor also carried out conservation work on the defenses of Lagos, who endowed it with an aqueduct for the water supply, built somewhere between 1490 and 1521. King Manuel I (1495–1521) granted a second Foral Charter in 1504, reformed a decade later, giving start to the construction of the Governors's Palace.
Under the expansionist project of King Sebastian (1568–1578), Lagos became a city in 1573, becoming the capital of the Kingdom of the Algarve and the residence of the Captains General and Governors. His successor, Cardinal Henry (1578–1580), confirmed the title in 1579.
During the Iberian Union, the strength of Lagos's defences increased. The city managed to fiercely oppose the landing of Francis Drake's forces in 1587, forcing Drake to seek a more vulnerable point in that stretch of coast (eventually attacking Sagres). The damage applied by the English artillery to Lagos, as well as the fear of new attacks on the coast, led to the reconstruction and modernization of its defenses in the following years.
* 1598 - completed work on the second wall
* 1621 - modernization and strengthening of the most fortified medieval section

### Post Middle Ages

At the time of the restoration of Portuguese independence, conservation works were undertaken on the walls (1642), when the proposal to build a large, pentagonal plant with five bastions at the corners, in the south of the city (1643) was approved.
Later, the city and its defences would be severely affected by the tsunami that devastated the Algarve coast as a result of the earthquake of 1755. The resulting destruction was such that the civilian and military governments were transferred to Tavira, less affected by the natural disaster. At the end of the century, the city center was transferred from the old Praça de Armas (current Praça Infante D. Henrique) to the Cano Square (now Gil Eanes Square).
In the 19th century, the city experienced a surge of economic growth, especially in the fish industry.
The walls and ramparts are classified as national monuments by a decree published on June 20, 1924.
From the second half of the 1950s, the government, through the Directorate General for National Buildings and Monuments, in view of the celebrations of Centenarians, conducted a wide intervention in the built-up heritage of Lagos, rebuilding addorsed buildings to ancient walls and bulwarks, rebuilding the Palace of the Governors, sections of walls and constructed the Discovery Avenue (Avenida dos Descobrimentos), a landfilled increased protection area between the city and the sea.
In 2001, the Baluarte of Porta Vila, was reclassified as an astronomical observatory.

## Characteristics

All of the city's defences have an incomplete plant in an irregular pentagon shape.
The medieval structure surrounded the town that developed around the Church of Santa Maria do Castelo.
The new fence, adapted to firearm artillery, is made up of three flank bastions (from Santa Maria, Alcaria and São Francisco) and four towers (the Praça de Armas, the Conception, Porta Room and Santo Amaro).