When federal troops were removed from the U.S. South at the end of Reconstruction in the late 1870s and the state legislatures of the former Confederacy were no longer controlled by carpetbaggers and African American freedmen, those legislatures began passing Jim Crow laws that reestablished white supremacy and codified the segregation of whites and Blacks.