The American Civil War (1861–1865), in the United States often referred to as The Civil War and sometimes called the "War between the States", was a civil war fought over the secession of the Confederate States. Eleven southern slave states declared their secession from the United States and formed the Confederate States of America ("the Confederacy"); the other 25 states supported the federal government ("the Union"). After four years of warfare, mostly within the Southern states, the Confederacy surrendered and slavery was abolished everywhere in the nation. Issues that led to war were partially resolved in the Reconstruction Era that followed, though others remained unresolved.
In the presidential election of 1860, the Republican Party, led by Abraham Lincoln, had campaigned against expanding slavery beyond the states in which it already existed. The Republicans strongly advocated nationalism, and in their 1860 platform they denounced threats of disunion as avowals of treason. After a Republican victory, but before the new administration took office on March 4, 1861, seven cotton states declared their secession and joined to form the Confederate States of America. Both the outgoing administration of President James Buchanan and the incoming administration rejected the legality of secession, considering it rebellion. The other eight slave states rejected calls for secession at this point. No foreign governments recognized the Confederacy.
Hostilities began on April 12, 1861, when Confederate forces fired on a U.S. military installation at Fort Sumter in South Carolina. Lincoln responded by calling for a volunteer army from each state to recapture federal property, which led to declarations of secession by four more slave states. Both sides raised armies as the Union seized control of the border states early in the war and established a naval blockade. Land warfare in the East was inconclusive in 1861–62, as the Confederacy beat back Union efforts to capture its capital, Richmond, Virginia, notably during the Peninsular Campaign. In September 1862, the Confederate campaign in Maryland ended in defeat at the Battle of Antietam, which dissuaded the British from intervening. Days after that battle, Lincoln issued the Emancipation Proclamation, which made ending slavery a war goal.
In 1863, Confederate general Robert E. Lee's northward advance ended in defeat at the Battle of Gettysburg. To the west, the Union gained control of the Mississippi River after the Battle of Shiloh (April 1862) and Siege of Vicksburg, splitting the Confederacy in two and destroying much of their western army. Due to his western successes, Ulysses S. Grant was given command of all Union armies in 1864, and organized the armies of William Tecumseh Sherman, George Meade and others to attack the Confederacy from all directions, increasing the North's advantage in manpower. Grant restructured the union army, and put other generals in command of divisions of the army that were to support his push into Virginia. He fought several battles of attrition against Lee through the Overland Campaign to seize Richmond, though in the face of fierce resistance he altered his plans and led the Siege of Petersburg which nearly finished off the rest of Lee's army. Meanwhile, Sherman captured Atlanta and marched to the sea, destroying Confederate infrastructure along the way. When the Confederate attempt to defend Petersburg failed, the Confederate army retreated but was pursued and defeated, which resulted in Lee's surrender to Grant at Appomattox Court House on April 9, 1865.
The American Civil War was one of the earliest true industrial wars. Railroads, the telegraph, steamships, and mass-produced weapons were employed extensively. The practices of total war, developed by Sherman in Georgia, the experimental use of the first usable predecessor of the machine gun and of trench warfare around Petersburg, all foreshadowed World War I in Europe. It remains the deadliest war in American history, resulting in the deaths of an estimated 750,000 soldiers and an undetermined number of civilian casualties. Historian John Huddleston estimates the death toll at ten percent of all Northern males 20–45 years old, and 30 percent of all Southern white males aged 18–40. Victory for the North meant the end of the Confederacy and of slavery in the United States, and strengthened the role of the federal government. The social, political, economic and racial issues of the war decisively shaped the reconstruction era that lasted to 1877.