Viana do Castelo (Portuguese pronunciation: [viˈɐnɐ ðu kɐʃˈtɛlu]) is a municipality and seat of the district of Viana do Castelo in the Norte Region of Portugal. The population in 2011 was 88,725, in an area of 319.02 km². The urbanized area of the municipality, comprising the city, has a population of approximately 36,148 inhabitants.
Human settlement in the region of Viana began during the Mesolithic era, from discoveries and archaeological excavations. Even around the Roman occupation the area was settled along the Mount of Santa Luzia.
The settlement of Viana da Foz do Lima, which it was called when King Afonso III of Portugal issued a foral (charter) on 18 July 1258, was a formalization of the 1253 Viana that the area was named.
In the 16th century, its port gained great importance as one of the entry-points for Portuguese explorers and traders, involved in the Portuguese discoveries. Many of the historical buildings originated during this period.
The prosperity that continued developed from the town's role as a port, protected by defensive structures (such as the Tower of Roqueta) to repel pirates from Galicia and north Africa. The port's ties to northern Europe came primarily from exports of wine, fruits and salt, and imports of tile, textiles and glass.
After the maritime discoveries and trade, the commercial life of Viana reached its greatest proportions during the reign of Queen Maria II of Portugal, when the monarch established the Associação Comercial de Viana do Castelo in 1852 (the fourth oldest public company of its type). The queen, in order to reward the loyalty of its citizens, who did not surrender to the Count of Antas, elevated the town to the status of city on 20 January 1848, renaming the settlement with its current name.