In the United States the period 1849 and 1865 was dominated by the Origins of the American Civil War between North and South, and the bloody fighting in 1861-1865 that produced Northern victory in the war and ended slavery. At the same time industrialization and the transportation revolution changed the economics of the Northern United States and the Western United States. Heavy immigration from Western Europe shifted the center of population further to the North. Industrialization went forward in the Northwestern United States. A rail network and a telegraph network linked the nation economically, opening up new markets. Immigration brought millions of European workers and farmers to the Northern United States. In the Southern United States, planters shifted operations (and slaves) from the poor soils of the Southeastern United States to the rich cotton lands of the Southwestern United States. Issues of slavery in the new territories acquired in the Mexican–American War (1846–1848) were temporarily resolved by the Compromise of 1850. One provision, the Fugitive Slave Law, sparked intense controversy, as revealed in the enormous interest in the plight of the escaped slave in Uncle Tom's Cabin, an 1852 anti-slavery novel and play. In 1854, the Kansas–Nebraska Act reversed long-standing compromises by providing that each new state of the Union would decide its posture on slavery. The newly formed Republican Party stood against the expansion of slavery and won control of most northern states (with enough electoral votes to win the presidency in 1860). The invasion of Bloody Kansas by pro- and anti-slavery factions intent on voting slavery up or down, with resulting bloodshed, angered both North and South. The Supreme Court tried to resolve the issue of slavery in the territories with a pro-slavery ruling in Dred Scott v. Sandford that angered the North. After the 1860 election of Republican Abraham Lincoln, seven Southern states declared their secession from the United States between late 1860 and 1861, establishing a rebel government, the Confederate States of America on February 9, 1861. The Civil War began when Confederate General Pierre Beauregard opened fire upon Union troops at Fort Sumter in South Carolina. Four more states seceded as Lincoln called for troops to fight an insurrection. The next four years were the darkest in American history as the nation tore at itself using the latest military technology and highly motivated soldiers. The urban, industrialized Northern states (the Union) eventually defeated the mainly