[5] The fortification system of San Juan is closely tied to the history of the city as it defended it from foreign and pirate attacks since its inception during the first half of the 16th century.
[6][7] Three fourths of the walls remain today as a third was heavily damaged during the 1867 earthquake and was later demolished to make way for the construction of a railway and the urban expansion of the city.
Named after King Philip II of Spain, it was built at the site of a former smaller fortress between the 16th and 18th centuries to protect the entrance to the Bay of San Juan and to defend the city from maritime attacks.
[18] In addition to its purpose to defend San Juan from attacks coming by land it also contained a large dungeon, barracks, powder houses and tunnels that connect it to the rest of the city wall system.
[20] Although it is not open to the public, the famous Devil's Sentry Box (La Garita del Diablo) is also located in Castillo San Cristóbal.
It forms part of a larger fortification system called La Línea Avanzada established in 1609 to defend the connecting point between the islet and the main island of Puerto Rico from both terrestrial and maritime attacks.
[28] La Fortaleza, now known as Palacio de Santa Catalina,[29] is the only fortification that is not administered by the National Park Service as it serves today as the official residence to the Governor of Puerto Rico (it is the oldest executive mansion in continuous use in the Western Hemisphere).