John Gray Foster (May 27, 1823 – September 2, 1874) was an American soldier. A career military officer in the United States Army and a Union general during the American Civil War, he served in North and South Carolina during the war. A postbellum expert in underwater demolition, he wrote a treatise on the subject in 1869. He continued with the Army after the war, using his expertise as assistant to the Chief Engineer in Washington, DC and at a post on Lake Erie. From 1862 to December 1863 Foster commanded the Department of North Carolina. After the Emancipation Proclamation, he appointed Horace James, a Congregational minister, to help freedmen prepare for independent life, and directed a former contraband camp to be developed as the Freedmen's Colony of Roanoke Island. By 1864, 2,200 freedmen were settled on household plots. Many worked for pay for the Army, which held the forts. Under President Andrew Johnson, after the war, the Army abandoned the colony. Most of the freedmen chose to return to the mainland for work. Early life Foster was born in Whitefield, New Hampshire. When he was ten, his family moved to Nashua, where he attended the local schools before enrolling in the Hancock Academy. He graduated from West Point in 1846, fourth in his class of 59 cadets. He first served as an engineer during the Mexican–American War, under Winfield Scott. Severely wounded at the Battle of Molino del Rey, he won two brevet promotions for bravery. After the war, Foster returned to West Point as an instructor. In 1858 he was on engineering duty in Charleston Harbor, where he helped in the construction of Fort Sumter. Civil War Promoted to captain of U.S. engineers, Foster was in command of the garrison at Fort Moultrie when the Civil War began. He immediately transferred his small force to Fort Sumter and became second-in-command to Maj. Robert Anderson during the Battle of Fort Sumter. Foster was appointed a brigadier general of volunteers on October 23, 1861, and commanded the 1st Brigade in Maj. Gen. Ambrose Burnside's North Carolina Expedition. He was conspicuous in action at the battles of Roanoke Island and New Bern. After the Battle of Roanoke Island, the Union renamed the Confederate Fort Bartow as Fort Foster in his honor. The US Army dismantled the three forts on the island in late 1865 after the end of the war. After