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. During the War of 1812, in which U.S. forces battled the British Empire and its Indian allies, Taylor successfully defended Fort Harrison in Indiana Territory from an Indian attack commanded by Tecumseh. The September 1812 battle represented the first land victory of the war for the American forces, for which Taylor received wide praise, as well as a brevet (temporary) promotion to the rank of major.