The Compromise of 1877 ended Reconstruction and resolved the disputed 1876 presidential election between Rutherford B. Hayes and Samuel Tilden. It involved Democrats agreeing to acknowledge Hayes as president in exchange for the removal of federal troops from former Confederate states, appointing at least one Southern Democrat to Hayes's cabinet, and constructing another transcontinental railroad in the South. The compromise brought Reconstruction to a close and helped industrialize the post-Civil War South.