The Compromise of 1876 was an informal agreement that effectively ended Reconstruction in the United States, resolving the disputed presidential election of 1876 between Rutherford B. Hayes and Samuel J. Tilden. This compromise allowed Hayes to take office as president while simultaneously leading to the withdrawal of federal troops from the South, thereby facilitating the return of white Democratic control over southern states and undermining the political and civil rights gains made by African Americans during Reconstruction.