Owing to its military importance, Cavite had been attacked by foreigners in their quest to conquer Manila and the Philippines. The Dutch made a surprise attack on the city in 1647, pounding the port incessantly, but were repulsed. In 1672, the British occupied the port during their two-year control in the Philippines.