After the election of 1876 the results were disputed in four states.This situation did not allowed any of the candidates to get the 185 electoral votes needed to win the election. Samuel Tilden ran for the Democratic party, and Rutherford B. Hayes ran for the Republic party. In the next year, a compromise was reached known as the Compromise of 1877. In the compromise Hayes received the electoral votes of the states disputed. This gave Hayes the presidency.