When the Spaniards arrived with their colonization plans in the early 1500s, San Juan was merely a deserted spit of land dominated by dramatic headlands and strong trade winds.

They settled just south of present-day San Juan in what was little more than a low-land outpost called Caparra. However, the settlement encountered constant Indian attacks and mosquito-borne malaria, so in 1521 the colonists retreated to the rocky outcrop and christened it Puerto Rico (Rich Port). A few years later a Spanish cartographer accidentally transposed Puerto Rico with San Juan Bautista – the name the Spaniards had given to the whole island – and the name change stuck.

The gigantic fortress, El Morro, with its 140ft ramparts, soon rose above the ocean cliffs, and the Catholic Church built a church, a convent and a cathedral.

For the next three centuries, San Juan was the primary military and legislative outpost of the Spanish empire in the Caribbean and Central America. But economically it stagnated.

That all changed after the Spanish-American War of 1898. The US annexed the island as a territory and designated San Juan the primary port. Agricultural goods such as sugar, tobacco and coffee flowed into the city. Jíbaros (country people) flocked into port for work and old villages such as Río Piedras were swallowed up.

WWII brought capital and development as the US beefed up its military defense on the island and the Caribbean. After the war, the monumental economic initiative called Operation Bootstrap began changing Puerto Rico from an agricultural to a manufacturing-based economy and hundreds of US factories relocated to San Juan after the island gained commonwealth status in 1951, to take advantage of tax breaks. Foreign and US banks arrived en masse, the first high-rise buildings went up, and tourist zones took shape along the beachfront of the burgeoning city.

The unchecked growth was a nightmare for city planners, who struggled to provide services, roads and housing. By the 1980s, unemployment was rampant and crime high. Ironically, Old San Juan was considered the epicenter of all that was wrong with the city. Tourists kept to the beach resorts of Condado and Isla Verde.

In 1992, the 500-year anniversary of Columbus’ arrival to the Americas gave city leaders the impetus to restore Old San Juan.

The new millennium has brought several successful projects such as the efficient Tren Urbano (metro) that opened in 2005, a convention center in Miramar, and a series of redeveloped hotels in Condado.

Of late, San Juan has been hit hard by Puerto Rico's economic upheaval. Tourism is now more important than ever to the local economy.