From the fifteenth century, the population gradually began to move down from the hills to settle by the bay and pursue fishing and boatbuilding activities. By 1516 there were already signs of abandonment. The ramparts were reinforced in 1693 and other improvements made and, in 1721, the Church of Santa Maria do Castelo, which was built by Afonso I, was restored. However, the castle was already in a bad condition when it was effectively ruined by the earthquake of 1755. In 1875, part of the grounds was converted into a cemetery.