Havana was originally a trading port, and suffered regular attacks by buccaneers, pirates, and French corsairs.
The first attack and resultant burning of the city was by the French corsair Jacques de Sores in 1555.
The pirate took Havana easily, plundering the city and burning much of it to the ground.
De Sores left without obtaining the enormous wealth he was hoping to find in Havana.
Such attacks convinced the Spanish Crown to fund the construction of the first fortresses in the main cities — not only to counteract the pirates and corsairs, but also to exert more control over commerce with the West Indies, and to limit the extensive contrabando (black market) that had arisen due to the trade restrictions imposed by the Casa de Contratación of Seville (the crown-controlled trading house that held a monopoly on New World trade).

To counteract pirate attacks on galleon convoys headed for Spain while loaded with New World treasures, the Spanish crown decided to protect its ships by concentrating them in one large fleet, the Spanish treasure fleet, which would traverse the Atlantic Ocean as a group.
A single merchant fleet could more easily be protected by the Spanish Armada or Navy.
Following a royal decree in 1561, all ships headed for Spain were required to assemble this fleet in the Havana Bay.
Ships arrived from May through August, waiting for the best weather conditions, and together, the fleet departed Havana for Spain by September.

This naturally boosted commerce and development of the adjacent city of Havana (a humble villa at the time).
Goods traded in Havana included gold, silver, alpaca wool from the Andes, emeralds from Colombia, mahoganies from Cuba and Guatemala, leather from the Guajira, spices, sticks of dye from Campeche, corn, manioc, and cocoa.
Ships from all over the New World carried products first to Havana, in order to be taken by the fleet to Spain.
The thousands of ships gathered in the city's bay also fueled Havana's agriculture and manufacture, since they had to be supplied with food, water, and other products needed to traverse the ocean.
In 1563, the Capitán General (the Spanish Governor of the island) moved his residence from Santiago de Cuba to Havana, by reason of that city's newly gained wealth and importance, thus unofficially sanctioning its status as capital of the island.

On December 20, 1592, King Philip II of Spain granted Havana the title of City (ciudad).
Later on, the city would be officially designated as "Key to the New World and Rampart of the West Indies" by the Spanish crown.
In the meantime, efforts to build or improve the defensive infrastructures of the city continued.
The San Salvador de la Punta castle guarded the west entrance of the bay, while the Castillo de los Tres Reyes Magos del Morro guarded the eastern entrance.
The Castillo de la Real Fuerza defended the city's center, and doubled as the Governor's residence until a more comfortable palace was built.
Two other defensive towers, La Chorrera and San Lázaro were also built in this period..
Havana was originally a trading port, and suffered regular attacks by buccaneers, pirates, and French corsairs. The first attack and resultant burning of the city was by the French corsair Jacques de Sores in 1555. The pirate took Havana easily, plundering the city and burning much of it to the ground. De Sores left without obtaining the enormous wealth he was hoping to find in Havana. Such attacks convinced the Spanish Crown to fund the construction of the first fortresses in the main cities — not only to counteract the pirates and corsairs, but also to exert more control over commerce with the West Indies, and to limit the extensive contrabando (black market) that had arisen due to the trade restrictions imposed by the Casa de Contratación of Seville (the crown-controlled trading house that held a monopoly on New World trade).
To counteract pirate attacks on galleon convoys headed for Spain while loaded with New World treasures, the Spanish crown decided to protect its ships by concentrating them in one large fleet, the Spanish treasure fleet, which would traverse the Atlantic Ocean as a group. A single merchant fleet could more easily be protected by the Spanish Armada or Navy. Following a royal decree in 1561, all ships headed for Spain were required to assemble this fleet in the Havana Bay. Ships arrived from May through August, waiting for the best weather conditions, and together, the fleet departed Havana for Spain by September.
This naturally boosted commerce and development of the adjacent city of Havana (a humble villa at the time). Goods traded in Havana included gold, silver, alpaca wool from the Andes, emeralds from Colombia, mahoganies from Cuba and Guatemala, leather from the Guajira, spices, sticks of dye from Campeche, corn, manioc, and cocoa. Ships from all over the New World carried products first to Havana, in order to be taken by the fleet to Spain. The thousands of ships gathered in the city's bay also fueled Havana's agriculture and manufacture, since they had to be supplied with food, water, and other products needed to traverse the ocean. In 1563, the Capitán General (the Spanish Governor of the island) moved his residence from Santiago de Cuba to Havana, by reason of that city's newly gained wealth and importance, thus unofficially sanctioning its status as capital of the island.
On December 20, 1592, King Philip II of Spain granted Havana the title of City (ciudad). Later on, the city would be officially designated as "Key to the New World and Rampart of the West Indies" by the Spanish crown. In the meantime, efforts to build or improve the defensive infrastructures of the city continued. The San Salvador de la Punta castle guarded the west entrance of the bay, while the Castillo de los Tres Reyes Magos del Morro guarded the eastern entrance. The Castillo de la Real Fuerza defended the city's center, and doubled as the Governor's residence until a more comfortable palace was built. Two other defensive towers, La Chorrera and San Lázaro were also built in this period..
History of Havana