The American Civil War divided the country into the Union and the Confederacy. The Confederacy supported slavery and secession from the Union, whose states opposed slavery. Slavery was a key economic institution for the Confederacy but was illegal in Union states. While not all Northerners opposed slavery, President Lincoln and the Union fought to end it, seeing it as morally wrong. The 13th Amendment, passed after the Civil War, formally abolished slavery across the United States.