The Spanish built the Castillo de San Marcos along the winding, shallow channel of the Matanzas River, where ships entering the inlet faced the fort head on and could not deploy their guns broadside. This strategic location helped keep pirates and British warships at bay. During the 1740 British siege, ships from Cuba used the inlet at the southern end of Anastasia Island to resupply the town. After the siege, recognizing that enemies could also use the inlet, the Spanish built Fort Matanzas to protect St. Augustine's back door. Since these forts were built, the shifting sands of barrier islands have changed the landscape.