Phoenicians and Greeks set up shop at this port (which later became Roman Lacobriga) at the mouth of the muddy Rio Bensafrim. Afonso III recaptured it from the Moors in 1241, but it wasn't until 1249 that he claimed it definitively. In 1415 a giant fleet set sail from Lagos under the command of the 21-year-old Prince Henry the Navigator to seize Ceuta in Morocco, thereby setting the stage for the Age of Discovery.

The shipyards of Lagos built and launched Prince Henry’s caravels, and Henry split his time between his trading company here and his navigation school at Sagres. Local boy Gil Eanes left Lagos in 1434 as commander of the first ship to round West Africa’s Cape Bojador. Others continued to bring back information about the African coast, along with ivory, gold and slaves. Lagos has the dubious distinction of having hosted (in 1444) the first sale of Africans as slaves to Europeans, and the town grew into a slave-trading centre.

It was also from Lagos in 1578 that Dom Sebastião, along with the cream of the Portuguese nobility and an army of Portuguese, Spanish, Dutch and German buccaneers, left on a disastrous crusade to Christianise North Africa, which ended in a debacle at El-Ksar el Kebir in Morocco. Sir Francis Drake inflicted heavy damage on Lagos a few years later, in 1587.

Lagos was the Algarve’s high-profile capital from 1576 until 1755, when the earthquake flattened it.

Today tourism drives the economy.