The primary objective of the American Fifth Army Corps' invasion of Cuba was the capture of the city of Santiago de Cuba. U.S. forces had driven back the Spaniards' first line of defense at the Battle of Las Guasimas, after which General Arsenio Linares pulled his troops back to the main line of defense against Santiago along San Juan Heights. In the charge at the Battle of San Juan Hill U.S. forces captured the Spanish position. At the Battle of El Caney the same day, U.S. forces took the fortified Spanish position and were then able to extend the U.S. flank on San Juan Hill. The destruction of the Spanish fleet at the Battle of Santiago de Cuba allowed U.S. forces to safely besiege the city.