Though New Jersey passed an act for the gradual abolition of slavery in 1804, it wasn't until 1830 that most blacks were free in the state. However, by the close of the Civil War, about a dozen African-Americans in New Jersey were still apprenticed freedmen. New Jersey at first refused to ratify the Constitutional Amendments that banned slavery. New Jersey was a major part of the extensive Underground Railroad system. No battles took place within New Jersey throughout the course of the Civil War. However, over 88,000 soldiers from New Jersey were part of several infantry and cavalry regiments. In total, 31 regiments were created by New Jersey soldiers during this war, along with four militia regiments, three cavalry regiments, and five batteries of light artillery. 23,116 of those soldiers served in the Army of the Potomac. Soldiers from New Jersey fought generally in the Eastern theater of the Civil War Over 6,000 soldiers from New Jersey lost their lives in the war. Philip Kearny, an officer from the Mexican–American War, led a brigade of New Jersey regiments under Brigadier General William B. Franklin. Kearny distinguished himself as a brilliant officer during the Peninsula Campaign, and was promoted to the position of major general. New Jersey was one of the few states to vote for Stephen Douglas instead of Abraham Lincoln in the Presidential Election of 1860. The people of New Jersey also gave its electoral votes to George McClellan when he ran for President against Abraham Lincoln in the election of 1864, being the only free state that rejected Lincoln twice. McClellan later became the governor of New Jersey, from 1878 to 1881. Many cities like Paterson, New Jersey and Camden, New Jersey grew extremely strong through the duration of the Civil War. They produced many necessities, including clothing and war materials like ammunition. These cities prospered through constant production even after the end of the war. Cities like those of Paterson and Camden became crucial to the Northern war effort. With the Union's ability to manufacture more supplies, the Union was able to defeat the Confederates and successfully conclude the war and reunite the country. City)" (2 vol 1920) vol 1 online