The first fortifications of San Lorenzo castle were built by prominent military engineer Juan Bautista Antonelli in 1595. The location, on a rocky knoll guarding the mouth of the Charges River, was of key importance, as it was on the route the Spanish used to transport more than half of their commodities from their colonies. Shortly after the first construction, the castle was attacked and burnt to the ground by Englishman Francis Drake. The castle was rebuilt several times in the seventeenth and eighteenth centuries. Between 1761 and 1768, noted military engineer Manuel Hernadez constructed the neo-classical castle that stands today. The last Spanish troops left San Lorenzo in 1821. In the nineteenth century the castle was used as a jail, a holding area for mail, a camping locale for travelers on their way to California during the Gold Rush, and by the U.S. military.
1998, 2000 and 2002 World Monuments Watch
In the early 2000s WMF, working with the Smithsonian Tropical Research Institute, the Panamanian Institute of Culture, and other local agencies carried out a study to evaluate the endangered cultural and natural resources associated with the castle and its environment. While the Smithsonian Institute focused on the assessment and interventions of endangered biological species, deforestation, and soil erosion, WMF conducted a conservation plan that included research, restoration drawings, and condition assessments, which resulted in conservation plan. Students involved in a conservation program assisted professionals with the second phase of the project, which included the removal of concrete from the castle's main defensive wall and consolidation of historic materials.
San Lorenzo Castle had a prominent role during Panama’s colonial period, guarding a port where some sixty percent of Spain’s goods being shipped back to Europe. The substantial wealth that traveled through the area provoked confrontations over three centuries from pirates and other colonial powers, including the British, led by men such as Sir Henry Morgan and Francis Drake. The high value of the castle is evident since the Spanish, after every attack that damaged or destroyed it, immediately rebuilt it. Today the castle survives as a unique example of the evolution of Spanish fortification architecture and an important example of a piece of the Spanish colonial maritime transportation system.