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. 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. Buchanan's personal life has attracted historical interest, as the only president to remain a bachelor. Several writers have speculated he was homosexual, including sociologist James W. Loewen, and authors Robert P. Watson and Shelley Ross.