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.
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.
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;