The major earthquake in 1755 that affected much of Portugal destroyed part of the fortress, which was subsequently repaired. In 1773 work was carried out on remodelling the chapel of Santa Bárbara inside the fortress. Shortly afterwards an inspection report was prepared that commented negatively on its condition and in 1800 new batteries were built to make landing in the harbour more difficult and the parapet of the fortress facing the sea was also raised in height. The extent of the work carried out caused financial problems for the local people, who sought and obtained assistance from Queen Maria I. Further extensive improvements were carried out in 1807. However, the fortress proved to be ineffective in December 1807 during the Peninsular War, when Franco-Spanish troops landed at Peniche. Following their defeat by Anglo-Portuguese troops it was briefly considered in 1810 as a possible embarkation point for British troops should the renewed French invasion make this necessary. After the Congress of Vienna in 1815, which established peace within Europe, the fortress was abandoned. With urban pressure resulting from the population growth of Peniche, certain parts were dismantled. In 1824 it was temporarily converted to a prison and used to detain political prisoners. During the Portuguese Civil War (1828-1834) it was reoccupied but when Liberal forces occupied the Berlengas Fort in 1833, Absolutist forces left Peniche. In 1837 an explosion of gunpowder inside the fortress led to a violent fire, which completely destroyed the Governor's House. In 1871, the Governor of the fortress reported on its bad condition and some restoration work was carried out.