The rapid expansion of the cotton industry following the invention of the cotton gin greatly increased the demand for slave labor, with the population of enslaved persons peaking at 4+ million. Pro-slavery activists attempted to extend slavery territories into the West but were met with significant resistance with the presidential election of Abraham Lincoln, who ran on a platform of halting the expansion of slavery. As a result, seven southern states, including South Carolina, broke away to form the Confederacy.