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.