During the Mexican–American War of 1846–48, American forces captured the fortress on April 22, 1847. They garrisoned it as a post to protect their line of communications between Veracruz and Mexico City from guerrillas.