He served as the eighth president of the United States from 1837 to 1841. A primary founder of the Democratic Party, he served as New York's attorney general, U.S. senator, then briefly as the ninth governor of New York before joining Andrew Jackson's administration as the tenth United States secretary of state, minister to Great Britain, and ultimately the eighth vice president when named Jackson's running mate for the 1832 election. Van Buren won the presidency in 1836, lost re-election in 1840, and failed to win the Democratic nomination in 1844. Later in his life, Van Buren emerged as an elder statesman and an important anti-slavery leader who led the Free Soil Party ticket in the 1848 presidential election.