After the Civil War, the turbulent era that endeavored to reintegrate the Confederate States and the four million newly-freed slaves into the United States became a period of lost hope and dreams. Under Andrew Johnson's administration, new southern state legislatures passed restrictive "black codes" to control the former slaves. Northern Republicans passed the Reconstruction Act of 1867 that gave newly enfranchised blacks a voice in government for the first time in U.S. history. 265 African-Americans won elections to southern state legislatures and the U.S. Congress. However, progressive measures would last less than ten years, and the plight of African-Americans would revert to blatant inequality once again.