Following the surrender of Vera Cruz in late March, Winfield Scott began his drive westward toward the Mexican capital.
The first significant opposition from Santa Anna's forces occurred at Cerro Gordo, a town located in a 10,000-foot mountain pass about 60 miles inland. A potentially dire situation was averted by resourceful American engineering forces (including Robert E. Lee), when an obscured path was discovered. This enabled the U.S. forces to outflank their opponents.
The American victory routed the Mexican defenders. Santa Anna was forced to flee on foot; he headed back to Mexico City to prepare the final defenses. Scott's army pushed on toward the town of Puebla.