The issue of slavery was the main cause of the American Civil War. The Northern states were largely industrial and opposed to slavery, while the Southern states were largely agricultural and dependent on slavery. The conflict between these two regions boiled over in 1861 when the Southern states seceded from the Union and formed the Confederate States of America. The ensuing war lasted four years and resulted in the preservation of the Union and the abolition of slavery.