Scott had a distinguished career in the U.S. Army which lasted over 50 years. Giving up law to enter the army in 1808, he served in the War of 1812, the Mexican War, and the beginning of the Civil War. He served with such distinction during the War of 1812 that, by the end of the conflict he was a brigadier-general and had become a national hero. In 1825, Scott completed the first manual of military tactics in the U.S. Army and, in 1841, he was appointed general-in-chief of the U.S. Army, a post he would hold until ill-health forced his retirement in November 1861. During the Mexican War, Scott led the American army in many critical victories, eventually capturing Mexico City. He was the Whig candidate for President in 1852, but was defeated by Franklin Pierce.