Answer:
The informal Compromise of 1877 between southern Democrats and northern Republicans was due to an election which was contested.
It was agreed upon that Rutherford B. Hayes who was a Republican would be chosen as President by Congress in exchange to have the Federal troops removed from the Southern States in order to bring an end to Reconstruction.