Attracted to the treasure, pirates began attacking Panama's coast around 1560. To protect the Atlantic terminus of Las Cruces Trail (Camino Real de Cruces), Spain built Fort San Lorenzo at the Chagres River's mouth. From 1587 to 1599, the fortifications evolved into a sea-level battery.[3]