Zachary Taylor (November 24, 1784 – July 9, 1850) was the 12th president of the United States, serving from March 1849 until his death in July 1850. The Mexican–American War broke out in April 1846, and Taylor defeated Mexican troops commanded by General Mariano Arista at the battles of Palo Alto and Resaca de la Palma and drove his troops out of Texas. Taylor then led his troops into Mexico, where they defeated Mexican troops commanded by Pedro de Ampudia at the Battle of Monterrey.