After the defeat of the Confederacy, federal forces remained in Charleston during the city's reconstruction.