Tensions between slave and free states mounted with arguments over the relationship between the state and federal governments, as well as violent conflicts over the spread of slavery into new states. Abraham Lincoln, a candidate of the mostly antislavery Republican Party, was elected president in 1860. Before he took office, seven slave states declared their secession—which the federal government maintained was illegal—and formed the Confederate States of America. With the Confederate attack upon Fort Sumter, the American Civil War began and four more slave states joined the Confederacy. Lincoln's Emancipation Proclamation committed the Union to end slavery. Following the Union victory in 1865, three changes to the U.S. Constitution secured freedom for the nearly four million African Americans who had been slaves, made them citizens, and gave them voting rights. The war and its resolution led to a big increase in federal power.