Havana was one of the most important Spanish cities in the New World. What Spain found in Havana was an easily protected harbor and excellent staging area for the return voyage to Spain. Columbus first set eyes on Cuba in 1492. By 1511 Spain had regular settlements with the port town of Havana being established in 1514.
The Spanish Silver fleet would start its collection in Venezuela and Peru, making stops in Panama and along the coast of Mexico. As the ships collected their cargo, they would head for the safe harbour of Havana, where the would form a massive Flota before heading back to Spain. It was hard to keep such an operation a secret and just about every pirate and smuggler in the Caribbean saw the waters around the Cuba as the place to go plundering.
Click here to enlarge the map
The islands of the Florida Keys became the staging area for pirates who who lay in wait for the Silver Fleet as it approached Havana. Pirates would mingle among the saloons and whore houses in Havana and listen to the idle gossip for any information when the ships would be arriving. It was common knowledge by all seafaring men that Spain sent two fleets a year back to the home land. Typically the fleets came to America in the late summer. They would winter around Cartegena, Vera Cruz, and Acapulco. In the Spring the ships would make their way to Havana, Once assembled, they knew they had just a few short months before the Hurricanes would make safe passage to Spain an impossibility. The Spaniards knew it, the pirates knew it, and the Spaniards knew the pirates knew it.
The pirates had little trouble finding out when and where the the silver fleets would be coming from. Many of the Spanish colonists throughout the "Main" and in Havana were more than willing to tell them anything they wanted to know, for a price. You see, the Spanish royal family controlled the "Casa de Contratación" or House of Trade and stipulated that merchants within the colonies could only trade with specific merchant seamen. In other words they told the Spanish colonists that they were not allowed to trade with other towns in the new world or make trade arrangements with any settlements of foreign governments. The colonists had to buy goods that were brought to the colonies from Spain and could only sell goods to the same ships.
As such many Havanans (as well as citizens of other towns) were corrupt would let slip when the silver ships would be arriving. It was a win win situation for the citizens of the towns. If the pirates captured the ship, then the pirates would have money to spend in the New World and the Spanish merchants would have a place to sell their goods. If the pirates failed, then the town people could witness a hanging or two.
As time passed, the town and it's harbor became well fortified, with the forts, Castillo de los Tres Reyes del Mooro and Castillo de San Salvador de la Punta protecting the entrance of the harbor. A fleet of Spanish galleons would also patrol the water in search of pirates. And if this were not enough, every night, large chain that was actually drawn across the mouth of the harbor to prevent saboteurs from entering the harbor and sinking ships. The reefs outside the harbor added to the protection as well as added to the loss of many silver ships.
All of these measures made Havana one of the best fortified cities in the New World. Despite all of these measures, Havana would repeatedly get invaded and on more than one occasion it was sacked by pirates or foreign nations.