The drift toward war with Mexico had begun a year earlier when the U.S. annexed the Republic of Texas as a new state. Ten years before, the Mexicans had fought an unsuccessful war with Texans to keep them from breaking away to become an independent nation. Since then, they had refused to recognize the independence of Texas or the Rio Grande River as an international boundary. In January 1946, fearing the Mexicans would respond to U.S. annexation by asserting control over disputed territory in southwestern Texas, President James K. Polk ordered General Zachary Taylor to move a force into Texas to defend the Rio Grande border.
After a last-minute effort to settle the dispute diplomatically failed, Taylor was ordered to take his forces up to the disputed borderline at the Rio Grande. The Mexican General Mariano Arista viewed this as a hostile invasion of Mexican territory, and on April 25, 1846, he took his soldiers across the river and attacked. Congress declared war on May 13 and authorized a draft to build up the U.S. Army.
Taylor, however, was in no position to await formal declaration of a war that he was already fighting. In the weeks following the initial skirmish along the Rio Grande, Taylor engaged the Mexican army in two battles. On May 8, near Palo Alto, and the next day at Resaca de la Palma, Taylor led his 200 soldiers to victories against much larger Mexican forces. Poor training and inferior armaments undermined the Mexican army's troop advantage. Mexican gunpowder, for example, was of such poor quality that artillery barrages often sent cannonballs bouncing lazily across the battlefield, and the American soldiers merely had to step out of the way to avoid them.
Following his victories at Palo Alto and Resaca de la Palma, Taylor crossed the Rio Grande and took the war into Mexican territory. During the next 10 months, he won four battles and gained control over the three northeastern Mexican states. The following year, the focus of the war shifted elsewhere, and Taylor's role diminished. Other generals continued the fight, which finally ended with General Winfield Scott's occupation of Mexico City in September of 1847.
Zachary Taylor emerged from the war a national hero. Americans admiringly referred to him as "Old Rough and Ready" and erroneously believed his military victories suggested he would be a good political leader. Elected president in 1848, he proved to be an unskilled politician who tended to see complex problems in overly simplistic ways. In July 1850, Taylor returned from a public ceremony and complained that he felt ill. Suffering from a recurring attack of cholera, he died several days later.