On November 24, 1784, Zachary Taylor was born in Virginia, though he grew up on Kentucky frontier land. Taylor spent decades in the U.S. Army, serving in frontier posts and in the Mexican–American War. His victories in battles such as Palo Alto and Buena Vista made him a national hero. Capitalizing on his popularity, the Whig Party nominated him for president in 1848, even though he had limited political experience. As the 12th president, he opposed the expansion of slavery into some western territories, which put him at odds with many Southern leaders despite his own background as a slaveholder. His sudden death in 1850 cut his presidency short and left many of his political intentions unresolved.