The American Civil War was fought from 1861 to 1865 between the Northern and Southern states over the issues of slavery and states' rights. Several Southern states seceded from the Union to form the Confederate States of America. The war began after the election of President Abraham Lincoln, who opposed the expansion of slavery. Though the Union and Confederate armies fought across many battlefields, the war ended in April 1865 with the surrender of Confederate General Robert E. Lee to Union General Ulysses S. Grant.