The 1876 presidential race between Republican Rutherford B. Hayes and Democrat Samuel Tilden was extremely close. Amidst violence, intimidation, and voter fraud, the winner of the election for president and governor in South Carolina, Florida, and Louisiana was disputed. These states were the last three former Confederate states governed by Republicans. Congress set up a special commission to decide the election, and a compromise was reached. According to the Compromise of 1877, the three Southern states would give their electoral votes for president to Republican Rutherford B. Hayes, but Democrats would be allowed to take control of the governments of those states. Hayes was inaugurated on March 5, 1877. Among his first acts was to end Northern occupation of the states still under military control.