Philip IV, king of Spain and Portugal, ordered the assembly of a combined army and naval task force with the objective of recovering the city.
There Willekens revealed that his objective was the capture of the city of Salvador, on the coast of Brazil, in order to use its port as a commercial base to ensure the Dutch trade with the East Indies.
[13] These intentions to invade Brazil were soon reported to the court of Madrid by the Spanish spies in the Netherlands, but Count-Duke of Olivares did not give them credit.
The Portuguese governor of Salvador, Diogo de Mendonça Furtado, organized the defense of the town by hastily recruiting 3,000 men.
[16] The defenses of the city were reinforced and expanded with moats and ramparts and the garrison was soon increased to up to 2,500 men with numerous slaves of the Portuguese seduced by promises of freedom and land.
[12] However, the Dutch garrison soon began to be harassed by the local guerrilla organized by Bishop Dom Marcos Teixeira, who had escaped inland.
He managed to assemble a force of 1,400 Portuguese and 250 Indian auxiliaries,[17][18] who built fortifications and organized ambushes against the Dutch in the surrounding forests.
When news of the loss of Salvador arrived to Spain in August 1624, Philip IV ordered to assemble a joint Spanish-Portuguese fleet under Admiral Fadrique Álvarez de Toledo y Mendoza with the mission to retake the city.
After waiting for some Portuguese ships delayed by rough seas and 7 caravels under the command of Francisco de Moura sent from Pernambuco, the fleet entered the Bay of Todos os Santos on March 29.
Two days later, the Dutch attempted to break the blockade sending two fire ships against the anchored Spanish-Portuguese fleet, but they didn't cause any damage.
1,912 Dutch, English, French, and German soldiers surrendered, and 18 flags, 260 guns, 6 ships, 500 black slaves, and considerable amount of gunpowder, money, and merchandise were captured.
One of them returned to Holland with the supplies and ammunition for the garrison of Salvador; the other two attacked respectively the Spanish Caribbean colonial town of San Juan de Puerto Rico and the Portuguese African trading post of the Castle of Elmina but were both decisively defeated.
[10] The Dutch prisoners were returned to the Low Countries aboard five German store ships, being the officers judged on their arrival by the loss of the city.