In 1845, Texas became a U.S. state, and President James K. Polk directed Taylor to deploy into disputed territory on the Texas-Mexico border, under the order to defend the state against any attempts by Mexico to take it back after it had lost control by 1836. Taylor was given command of American troops on the Rio Grande River. When some of Taylor's men were attacked by Mexican forces near the river, Polk told Congress in May 1846 that a war between Mexico and the United States had started by an act of the former. That same month, Taylor commanded American forces at the Battle of Palo Alto, using superior artillery to defeat the significantly larger Mexican opposition. In September, Taylor was able to inflict heavy casualties upon the Mexican defenders at the Battle of Monterrey. The city of Monterrey was considered "un-destroyable". He was criticized for not ensuring the Mexican army that surrendered at Monterrey disbanded. Afterwards, half of Taylor's army was ordered to join General Winfield Scott's soldiers as they besieged Veracruz. Mexican General Antonio López de Santa Anna, through a letter by Scott destined for Taylor that had been intercepted by the Mexicans, found out that Taylor had only 6,000 men, many of whom were not regular army soldiers, and resolved to defeat him. Santa Anna attacked Taylor with 20,000 men at the Battle of Buena Vista in February 1847, inflicting 672 American casualties at a cost of 1,800 Mexican. As a result, Santa Anna left the field of battle.