The American Civil War was a four-year war (1861–65) between the United States and 11 Southern states that seceded from the Union and formed the Confederate States of America. The main cause of the war was the dispute over whether slavery would be allowed to expand into the western territories, which divided the nation into two sections: the North, which opposed slavery, and the South, which supported it. The war resulted in more than 600,000 deaths, the abolition of slavery in the United States, and the preservation of the Union as one nation. Some of the major events and battles of the war include: The secession of South Carolina in December 1860, followed by six more states in January 1861. The attack on Fort Sumter in April 1861 by Confederate forces, which marked the beginning of armed conflict. The first major battle at Bull Run in July 1861, which ended in a Confederate victory. The Battle of Antietam in September 1862, which was the bloodiest single-day battle in American history. The Battle of Gettysburg in July 1863, which was considered a turning point in favor of the Union.