For a long period Aveiro was an important economic link in the production of salt and commercial shipping. It was a centre of salt exploration by the Romans and trade centre through the Middle-ages, registered since 26 January 959 (from the testament of Countess Mumadona Dias to the cenóbio of Guimarães). During this testament, Mumadona Dias also highlighted the ancient name for Aveiro, this time referring to the monastery's lands in Alauario et Salinas, literally, "a gathering place or preserve of birds and of great salt". From 11th century onwards, Aveiro became popular with Portuguese royalty.
The first charter (foral) was conceded by Manuel I of Portugal on 4 August 1515, as indicated in the Livro de Leituras Novas de Forais da Estremadura. Its geographic position along the Aveiro River had always helped it to subsist and grow, supported by salt market, fishing and maritime commercial development. By the beginning of the 15th century, there already existed a great wall around the historical centre, intonating the significance of the community and growth of the population. This included the founding of many religious institutions and their supports, which assisted during the 17th and 18th century crises associated with silt in the waterway. In the winter of 1575, a terrible storm closed the entrance to its port, ending a thriving trade in metals and tiles, and creating a reef barrier at the Atlantic Ocean. The walls were subsequently demolished and used to create the docks around the new sand bar.en.wikipedia.org