James Buchanan, the 15th President of the United States (1857-1861), served immediately prior to the American Civil War. He remains the only President to be elected from Pennsylvania and to remain a lifelong bachelor.