quality:corruption, quality:correction, structural:summarization
Redemption, dictatorship, and exile

After some time in exile, and after meeting U.S. President Andrew Jackson in 1837, Santa Anna was allowed to return to Mexico. He was transported aboard the USS Pioneer to retire to his hacienda in Veracruz. There he wrote a manifesto in which he reflected on his experiences and decision-making in Texas.

In 1838, Santa Anna found a chance for redemption from the loss of Texas. After Mexico rejected demands for financial compensation for losses suffered by its citizens, France sent forces that landed in Veracruz in the Pastry War. The Mexican government gave Santa Anna control of the army and ordered him to defend the nation by any means necessary. Santa Anna engaged the French at Veracruz but was forced to retreat after a failed assault, sustaining injuries in his left leg and hand by cannon fire. His shattered ankle required amputation of much of his leg, which he ordered buried with full military honors. Despite Mexico's final capitulation to French demands, Santa Anna used his war service and visible sacrifice to the nation to re-enter Mexican politics.

Soon after, with Bustamante's presidency descending into chaos, supporters asked Santa Anna to take control of the provisional government. Santa Anna was made president for the fifth time, taking over a nation with an empty treasury. The war with France had weakened the country, and the people were discontented. Also, a rebel army led by Generals José de Urrea and José Antonio Mexía, was marching towards Mexico City in opposition to Santa Anna. Commanding the army, Santa Anna crushed the rebellion in Puebla.

Santa Anna ruled in a more dictatorial fashion than during his first administration. His government banned anti-Santanista newspapers and jailed dissidents to suppress opposition. In 1842, he directed a military expedition into Texas. The action inflicted numerous casualties with no political gain, but Texans began to be persuaded of the potential benefits of annexation by the more powerful U.S.

Following the 1842 elections, at which a new Congress was elected which opposed his rule, Santa Anna attempted to restore the treasury by raising taxes. Several Mexican states stopped dealing with the central government in response, and Yucatán and Laredo declared themselves independent republics. With resentment growing, Santa Anna stepped down and fled Mexico City in December 1844. The buried leg he left behind in the capital was dug up by a mob and dragged through the streets until nothing was left of it. Fearing for his life, Santa Anna tried to elude capture, but in January 1845 he was apprehended by a group of Native Americans near Xico. They turned him over to authorities, and he was imprisoned. Santa Anna's life was ultimately spared, but he was exiled to Cuba.