An informal deal was struck to resolve this dispute. The compromise of 1877, which awarded all 20 electoral votes to Hayes. In return for the Democrats's acquiescence to Hayes's election , the Republicans agreed to withdraw federal troops from the south , ending Reconstruction.