James Buchanan Jr. (; April 23, 1791 – June 1, 1868) served as the 15th president of the United States from 1857 to 1861, serving directly prior to the American Civil War. A member of the Democratic Party for much of his career, Buchanan served as Secretary of State and represented Pennsylvania in both houses of the U.S. Congress before becoming president.