The Fort of São João Baptista, located on the island Berlenga, was built in 1651, by order of D. João IV, and completed in 1656. The fort is connected to the mainland by a stone bridge.
Built with the aim of preventing the occupation of the island by North African corsairs or enemy powers, the fort experienced the most famous war episode in its history in June 1666. On that date, the Fort of São João Baptista was besieged by a Spanish fleet, consisting of fourteen ships and a caravel, under the command of D. Diogo Ibarra. The fortification, defended at the time by a small garrison of only twenty men and nine pieces of artillery, and commanded by Avelar Pessoa, was able to resist for two days to the fierce enemy bombardment and to cause a considerable reduction of the besieging forces, which resulted in almost five hundred dead, a ship sunk and two others heavily damaged, compared to one dead and four wounded Lusitanians. The lack of provisions and ammunition and the desertion of some soldiers, which made D. Diogo Ibarra understand the dramatic situation of the Portuguese seals, finally caused the capitulation of the Fort of São João Baptista. The fort, connected to the mainland by a stone bridge, was definitively abandoned in 1847.