During the Anglo-Spanish War (1585-1604), the Battle of Sesimbra Bay between two English naval forces and a Spanish fleet took place on June 3, 1602. The English managed to sink two Spanish vessels, forcing the Spaniards to withdraw to the fishing village of Sesimbra, where they attacked the existing fort and caused heavy damage.
The present fort was constructed when King John IV ordered the strengthening of Portugal’s Atlantic defences in the face of attacks by the Spanish navy during the Restoration War (1640-68). In many cases this involved restructuring earlier forts and increasing their firepower. The king appointed João de Cosmander, a Dutch Jesuit military engineer, to supervise construction of the new fortress on the site of the earlier fort built by King Manuel I, with the intention that it would be capable of protecting the fishing harbour of Sesimbra from piracy and from Spanish attacks. Cosmander also worked on the Castle of Campo Maior, the Castle of Belver, and the Castle of Elvas, all major forts in Portugal.
The fort, which is oriented east-west along the beach, has a very solid structure with an austere appearance. It was developed with a polygonal star-shaped plan, with a rectangular central body and bastions, with cylindrical bartizans. The interior area was divided to make space for the residence of the Governor, the garrison barracks, cisterns, a warehouse and a chapel dedicated to Saint James. The north side of the fortress, facing the village, presents a less military appearance. The round arch gate is topped with a coat of arms with the national shield and inscription indicating the date of inauguration, 1648.
In 1712, King John V decided to install the Military Government of the region in the fortress. At that time the fort also served as a summer residence for the "Boys of Palhavã", the infant bastard sons of the king. The structure suffered damage as a result of the earthquake on 1 November 1755 that struck much of Portugal, after which it underwent reconstruction work on the north wall, the Door of Arms and the barracks of the Captain. In 1781 the north wall was replaced.