In 1725, works were carried out to rebuild the chapel and the main buildings of the hospital and in 1743 a wall was added to prevent the general population from accessing the chapel during times when there were patients held in quarantine. The area was extensively damaged by the 1755 Lisbon earthquake and restoration was only completed in 1786. The role as a quarantine hospital ended in the early 1800s, when the fort was vacated. Repair works were carried out during the Portuguese Civil War (1828-1834). The fort was used as a military prison until the end of the conflict, after which it was deactivated again. Later, it was occupied by the Algarve Fisheries Company for the production of fish guano, until this activity was stopped for public health reasons. After being re-occupied by the State, it served as a nursery for the national forests and as a shelter for the royal galleys.