Zachary Taylor (November 24, 1784 – July 9, 1850) was an American military leader who served as the 12th president of the United States from 1849 until his death in 1850. Taylor previously was a career officer in the United States Army, rising to the rank of major general and becoming a national hero as a result of his victories in the Mexican–American War. As a result, he won election to the White House despite his vague political beliefs. His top priority as president was preserving the Union. He died sixteen months into his term, having made no progress on the most divisive issue in Congress, slavery.