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. Taylor previously was a career officer in the United States Army, rose to the rank of major general and became 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, but he died sixteen months into his term, before making any progress on the status of slavery, which had been inflaming tensions in Congress.