Slavery in the United States was a form of slave labor which existed as a legal institution from the early colonial period. After the American Revolution, the northern states all abolished slavery, and Congress prohibited slavery in the Northwest Territory. However slavery gained new life with the cotton industry after 1800, and expanded into the Southwest. The import or export of slaves became illegal in 1807. By the 1850s the South was vigorously defending slavery and its expansion into the territories. In the North a small number of abolitionists denounced it as sinful, and a large number of anti-slavery forces rejected it as detrimental to the rights of free men. Compromises were attempted and failed, and in 1861 eleven slave states broke away to form the Confederate States of America. To defeat the Confederacy the Union in 1862 made abolition of all slavery a war goal, which was achieved in 1865. All the slaves were free and the owners received no compensation.