Slave states and free states
In the United States before 1865, a slave state was a state in which slavery and the slave trade were legal, while a free state was one in which they were not. Between 1812 and 1850, it was considered by the slave states to be politically imperative that the number of free states not exceed the number of slave states, so new states were admitted in slave–free pairs. There were, nonetheless, some slaves in most free states up to the 1840 census, and the Fugitive Slave Act of 1850 specifically stated that a slave  did not become free by entering a free state. Although Native Americans had small-scale slavery, slavery in what would become the United States was established as part of European colonization. By the 18th century, slavery was legal throughout the Thirteen Colonies, after which rebel colonies started to abolish the practice. Pennsylvania abolished slavery in 1780, and about half the states abolished slavery by the end of the Revolutionary War or in the first decades of the new country, although this did not usually mean that existing slaves became free. Although not one of the Thirteen Colonies, Vermont declared its  independence from Britain in 1777 and at the same time limited slavery, before being admitted as a state in 1791. Slavery was a very divisive issue in the United States. It was the largest issue during the writing of the U.S. Constitution in 1787, and was the primary cause of the American Civil War in 1861. Just before the Civil War, there were 19 free states and 15 slave states. During the war, slavery was abolished in some of these jurisdictions, and the Thirteenth Amendment to the United States Constitution, ratified in December 1865, finally abolished slavery throughout the United  States. Early history. Slavery was established as a legal institution in each of the Thirteen Colonies, starting from 1619 onwards with the arrival of "twenty and odd" enslaved Africans in Virginia. Although indigenous peoples were also sold into slavery, the vast majority of the enslaved population consisted of Africans brought to the Americas via the Atlantic slave trade. Due to a lower prevalence of tropical diseases and better treatment, the enslaved population in the colonies had a higher life expectancy than in the West Indies and South America, leading to a rapid increase in population in the decades prior to  the American Revolution. Organized political and social movements to end slavery began in the mid-18th century. The sentiments of the American Revolution and the promise of equality evoked by the Declaration of Independence stood in contrast to the status of most Blacks, either free or enslaved, in the colonies. Despite this, thousands of Black Americans fought for the Patriot cause for a combination of reasons. Thousands also joined the British, encouraged by offers of freedom such as the Philipsburg Proclamation. In the 1770s, enslaved Black people throughout New England began sending petitions to northern legislatures demanding freedom. Five of the  Northern self-declared states adopted policies to at least gradually abolish slavery: Pennsylvania in 1780, New Hampshire and Massachusetts in 1783, and Connecticut and Rhode Island in 1784. The Republic of Vermont had limited slavery in 1777, while it was still independent before it joined the United States as the 14th state in 1791. These state jurisdictions thus enacted the first abolition laws in the Atlantic World. By 1804 (including New York (1799) and New Jersey (1804)), all of the Northern states had abolished slavery or set measures in place to gradually abolish it, although there were still hundreds of  ex-slaves working without pay as indentured servants in Northern states as late as the 1840 census (see Slavery in the United States#Abolitionism in the North). In the South, Kentucky was created a slave state from Virginia (1792), and Tennessee was created a slave state from North Carolina (1796). By 1804, before the creation of new states from the federal western territories, the number of slave and free states was 8 each. By the time of Missouri Compromise of 1820, the dividing line between the slave and free states was called the Mason-Dixon line (between Maryland and Pennsylvania), with  its westward extension being the Ohio River. The 1787 Constitutional Convention debated slavery, and for a time slavery was a major impediment to passage of the new constitution. As a compromise, the institution was acknowledged though never mentioned directly in the constitution, as in the case of the Fugitive Slave Clause. Article 1, Section 9, of the Constitution prohibited Congress from abolishing the importation of slaves, but in a compromise, the prohibition would be lifted in twenty years. The Act Prohibiting Importation of Slaves passed easily in 1807, effective in 1808. However, the ban on importation spurred an expansion in  the domestic slave trade, which remained legal until slavery was banned entirely in 1865 by the 13th Amendment. One of the other compromises of the Constitution created the three-fifths rule by which slave states acquired a proportional increase in the House of Representatives and Electoral College equivalent to the size of their disenfranchised slave populations. This increased strength of the southern states was dubbed "slave power" by opponents. New territories. The Northwest Ordinance of 1787, passed just before the U.S. Constitution was ratified, had prohibited slavery in the federal Northwest Territory. The southern boundary of the territory was the  Ohio River, which was regarded as a westward extension of the Mason-Dixon line. The territory was generally settled by New Englanders and American Revolutionary War veterans granted land there. The 6 states created from the territory were all free states: Ohio (1803), Indiana (1816), Illinois (1818), Michigan (1837), Wisconsin (1848), and Minnesota (1858). By 1815, the momentum for antislavery reform, state by state, appeared to run out of steam, with half of the states having already abolished slavery (Northeast), prohibited from the start (Midwest) or committed to eliminating slavery, and half committed to continuing the institution indefinitely (South). The  potential for political conflict over slavery at a federal level made politicians concerned about the balance of power in the Senate, where each State was represented by two Senators. With an equal number of slave states and free states, the Senate was equally divided on issues important to the South. As the population of the free states began to outstrip the population of the slave states, leading to control of the House of Representatives by free states, the Senate became the preoccupation of slave-state politicians interested in maintaining a congressional veto over federal policy in regard to slavery and  other issues important to the South. As a result of this preoccupation, slave states and free states were often admitted into the Union in opposite pairs to maintain the existing Senate balance between slave and free states. Missouri Compromise. Controversy over whether Missouri should be admitted as a slave state resulted in the Missouri Compromise of 1821, which specified that territory acquired in the Louisiana Purchase north of latitude 36° 30', which described most of Missouri's southern boundary, would be organized as free states and territory south of that line would be reserved for organization as slave states . As part of the compromise, the admission of Maine (August 19, 1821) as a free state was enabled by Missouri's compromise to join the union as a slave state (August 19, 1821). Texas and the Mexican Cession. The admission of Texas (1845) and the acquisition of the vast new Mexican Cession territories (1848), after the Mexican–American War, created further North-South conflict. Although the settled portion of Texas was an area rich in cotton plantations and dependent on slave labor, the territory acquired in the Mountain West did not seem hospitable to cotton or slavery. As part of  the Compromise of 1850, California was admitted as a free state without a slave state pair; California's admission also meant there would be no slave state on the Pacific Ocean. To avoid creating a free state majority in the Senate, California agreed to send one pro-slavery and one anti-slavery senator to Congress. Last battles. The difficulty of identifying territory that could be organized into additional slave states stalled the process of opening the western territories to settlement, while slave-state politicians sought a solution, with efforts being made to acquire Cuba (see: Lopez Expedition and Ostend Manifesto , 1852) and to annex Nicaragua (see: Walker affair, 1856–57), both to be slave states. Parts of Northern Mexico were also coveted, with Senator Albert Brown declaring "I want Tamaulipas, Potosi, and one or two other Mexican States; and I want them all for the same reason – for the plantation and spreading of slavery". Kansas. In 1854, the Missouri Compromise of 1820 was superseded by the Kansas–Nebraska Act, which allowed white male settlers in the new territories to determine, by vote (popular sovereignty), whether they would allow slavery within each territory. The result was that pro- and anti-slavery elements  flooded into Kansas with the goal of voting slavery up or down, leading to bloody fighting. An effort was initiated to organize Kansas for admission as a slave state, paired with Minnesota, but the admission of Kansas as a slave state was blocked because its proposed pro-slavery constitution (the Lecompton Constitution) had not been approved in an honest election. Anti-slavery proponents during the "Bleeding Kansas" period of the later 1850s were called "Free-Staters" and "Free-Soilers", and fought against pro-slavery Border Ruffians from Missouri. The animosity escalated throughout the 1850s, culminating in numerous skirmishes and devastation  on both sides of the question. Nevertheless, the North prevented Kansas Territory from becoming a slave state, and when Southern members of Congress departed "en masse" in early 1861, Kansas was immediately admitted to the Union as a free state. When the admission of Minnesota proceeded unimpeded in 1858, the balance in the Senate ended; this was compounded by the subsequent admission of Oregon as a free state in 1859. Slave and free state pairs. Before 1812, the concern about balancing slave-states and free states was not deeply considered. The following table shows the slave and free states as  of 1812. The year column is the year the state ratified the US Constitution or was admitted to the Union: From 1812 through 1850, maintaining the balance of free and slave state votes in the Senate was considered of paramount importance if the Union were to be preserved, and states were typically admitted in pairs: The balance was maintained until 1850: Civil War. The American Civil War (1861–1865) disrupted and eventually ended slavery. Eleven slave states joined the Confederacy, while the border states of Delaware, Maryland, Kentucky, and Missouri remained in the Union, despite the presence of slavery within their  borders. In 1863 western Virginia, much of which had remained loyal to the Union, was admitted as the new state of West Virginia with a commitment to gradual emancipation. The following year Nevada, a free state in the West, was also admitted. Special cases. West Virginia. During the Civil War, a Unionist government in Wheeling, Virginia, presented a statehood bill to Congress to create a new state from 48 counties in western Virginia. The new state would eventually incorporate 50 counties. The issue of slavery in the new state delayed approval of the bill. In the Senate Charles Sumner objected  to the admission of a new slave state, while Benjamin Wade defended statehood as long as a gradual emancipation clause would be included in the new state constitution. Two senators represented the Unionist Virginia government, John S. Carlile and Waitman T. Willey. Senator Carlile objected that Congress had no right to impose emancipation on West Virginia, while Willey proposed a compromise amendment to the state constitution for gradual abolition. Sumner attempted to add his own amendment to the bill, which was defeated, and the statehood bill passed both houses of Congress with the addition of what became known as the  Willey Amendment. President Lincoln signed the bill on December 31, 1862. Voters in western Virginia approved the Willey Amendment on March 26, 1863. President Lincoln had issued the Emancipation Proclamation on January 1, 1863, which exempted from emancipation the border states (four slave states loyal to the Union) as well as some territories occupied by Union forces within Confederate states. Two additional counties were added to West Virginia in late 1863, Berkeley and Jefferson. The slaves in Berkeley were also under exemption but not those in Jefferson County. As of the census of 1860, the 49 exempted counties held some  6000 slaves over 21 years of age who would not have been emancipated, about 40% of the total slave population. The terms of the Willey Amendment only freed children, at birth or as they came of age, and prohibited the importation of slaves. West Virginia became the 35th state on June 20, 1863, and the last slave state admitted to the Union. Eighteen months later, the West Virginia legislature completely abolished slavery, and also ratified the 13th Amendment on February 3, 1865. Washington D.C.. In the District of Columbia, formed with land from two slave states, Maryland and Virginia, the  trade was abolished by the Compromise of 1850. So as to avoid losing the profitable slave trading businesses in Alexandria (one was Franklin and Armfield), Alexandria County, D.C., requested that it be returned to Virginia, where the slave trade was legal; this took place in 1847. Slavery in the District of Columbia remained legal until 1862, when the walkout of all the Southern legislators permitted those remaining to pass the ban, which abolitionists had been seeking for decades. End of slavery. At the start of the Civil War, there were 34 states in the United States, 15 of which were  slave states. 11 of these slave states, after conventions devoted to the topic, issued declarations of secession from the United States, created the Confederate States of America, and were represented in the Confederate Congress. The slave states that stayed in the Union, Maryland, Missouri, Delaware, and Kentucky (called border states) remained seated in the U.S. Congress. By the time the Emancipation Proclamation was issued in 1863, Tennessee was already under Union control. Accordingly, the Proclamation applied only in the 10 remaining Confederate states. During the war, abolition of slavery was required by President Abraham Lincoln for readmission of Confederate states . The U.S. Congress, after the departure of the powerful Southern contingent in 1861, was generally abolitionist: In a plan endorsed by Abraham Lincoln, slavery in the District of Columbia, which the Southern contingent had protected, was abolished in 1862. In southern states, the legal elimination of slavery typically followed Union control. The Emancipation Proclamation declared all enslaved people in areas then under Confederate control free, but in practice, freedom required either slaves reaching Union lines or Union forces reaching their area. As Union forces advanced from January 1, 1863 to June 19, 1865 slaves were freed. West Virginia did not  abolish slavery in its first proposed constitution in 1861, though it did ban the importation of slaves from elsewhere. But Radical Republicans refused to admit it to the Union without putting some limits on the institution. In 1863, voters approved the Willey Amendment, which provided for gradual abolition of slavery, with the last enslaved people scheduled to be freed in 1884. On February 3, 1865, the state legislature approved immediate abolition. The Restored Government of Virginia — the Unionist government that governed the limited territory then under Union control which had not left to form West Virginia — voted to end slavery  at a constitutional convention on March 10, 1864. Arkansas, part of which came under Union control by 1864, adopted an anti-slavery constitution March 16, 1864. Louisiana — much of which had been under Union control since 1862 — abolished slavery through a new state constitution approved by voters September 5, 1864. The border states of Maryland (November 1, 1864) and Missouri (January 11, 1865) abolished slavery before the war's end. The Union-occupied state of Tennessee abolished slavery by popular vote on a constitutional amendment which took effect February 22, 1865. However, slavery legally persisted in Delaware, Kentucky, and (to  a very limited extent) New Jersey, until the Thirteenth Amendment to the United States Constitution abolished slavery throughout the United States on December 18, 1865, ending the distinction between slave and free states.