During the 1800s, Middletown underwent enormous economic, social, and physical change. Trouble began in 1807, when hostilities between the United States and Great Britain led Thomas Jefferson to ban international commerce, devastating a city whose prosperity depended on maritime trade. At the same time, limited farmland pushed many old farming families and other residents to leave for Ohio, Pennsylvania, and New York. New industries soon replaced farming and shipping as entrepreneurs opened factories producing goods such as pistols, pumps, swords, and suspenders, while quarries across the river supplied brownstone for buildings throughout the United States. Labor demands drew large numbers of Irish immigrants fleeing the potato famine in the late 1840s, and by 1850 more than 650 of the town's 8,400 residents were Irish immigrants. Middletown also shrank geographically as its northern section became Cromwell in 1851 and its southwestern section became Middlefield in 1866. Transportation advanced rapidly, with steamboats beginning service to Hartford and New York in 1822, trains arriving in 1849, the Airline Railroad bridge spanning the river in 1872, a bridge for pedestrians and vehicles opening in 1896, and electric trolleys appearing in the 1890s. In the 1830s, Middletown became a center of antislavery activism, as Black and white men and women spoke out against slavery and aided freedom seekers through the underground railroad. The city also gained prominence in education and public institutions with Wesleyan University in 1831, Connecticut's first high school in 1840, the Connecticut Hospital for the Insane in 1868, the Connecticut Industrial School for Girls in 1870, Russell Library in 1875, and Middlesex Hospital in 1895. During the Civil War, Middletown strongly supported the Union, sending 958 men from a population of 9,000 into military service, with more than 100 dying, while women supported the war effort at home and took on greater household responsibility. After the war, factories expanded and new ones produced bicycles, hammocks, rubber boots, and silver-plated tea sets, while immigrants from Germany, Sweden, Poland, Italy, and Russia increased the city's multicultural character, reflected in new churches and a growing industrial cityscape along the Connecticut River.