Aiming at the defense and development of that stretch of coastline, by promoting mercantile and fishing activities, its inhabitants were granted tributary privileges, with the duty to defend the mouth of the river Lima.
The defensive perimeter of the nascent town, into which the keep was inscribed, included walls: its limits are unknown today, but it is believed that they were completed at the end of the 14th century, when it became a flourishing borough.
Thus, between 1567 or and 1568 (depending on the source), when the town of Viana had already received the title of "notable", by orders of the city council a small rectangular fort was initiated next to Roqueta Tower, which took advantage of the old Manueline fortification as the southwest corner of its wall.
[1] Under the Habsburg Dynasty, during the reign of Philip I of Portugal (1580–1598), the Viana fort was completely remodeled and expanded, designed by the Italian military engineer and architect Filippo Terzi (1520–1597).
[1] In 1640, with the Restoration of independence, the population of the town flocked to the fort, surrounding it and forcing the capitulation of the Spanish garrison, whose commander was Don Bernardin Polano y Santillana.
[1] In the context of the War of Restoration, it saw renovation works and additions being made between 1652 and 1654, at the behest of Dom Diogo de Lima, Viscount of Vila Nova da Cerveira and Governor-of-Arms of Entre-Douro-e-Minho, who added the bulwark São Pedro.
[2] Later, in 1700, when the town prospered with the export of wines from the Douro region to centers such as Dunkirk, Rouen, Venice, England, Sweden and even Russia, the defenses were added with ravelins and a moat on the land side.
In front of it is the magazine, a quadrangular building with a register, with a perfect back portal surmounted by the coat of arms of Portugal and topped with a triangular gable.