Technically, African Americans were free as result of the Reconstruction amendments--13th, 14th and 15th amendments. However, the guarantees of these amendments, which abolished slavery, granted citizenship and voting rights for African American men, were eroded during Reconstruction. The period witnessed the restatement of the Slave Codes in the form vagrancy and loitering laws. Blacks were reduced to tenant farming and sharecropping and their civil and political rights were virtually eliminated. Reconstruction ended in 1876 as a result of the Hayes-Tilden Compromise, which removed the remaining federal troops from the South.