General Santa Anna, the president of Mexico, and General Martín Perfecto de Cos both escaped during the battle. Santa Anna was captured the next day on April 22 and Cos on April 24. After being held for about three weeks as a prisoner of war, Santa Anna signed the peace treaty that dictated that the Mexican army leave the region, paving the way for the Republic of Texas to become an independent country. These treaties did not necessarily recognize Texas as a sovereign nation but stipulated that Santa Anna was to lobby for such recognition in Mexico City. Sam Houston became a national celebrity, and the Texans' rallying cries from events of the war, "Remember the Alamo" and "Remember Goliad" became etched into Texan history and legend.