On November 7th, 1876, Republican Rutherford B. Hayes went to bed believing he had lost the presidential election. Almost 300,000 more people had voted for his opponent, Democrat Samuel Tilden. But Tilden was one vote short in the electoral college, while Hayes was 20 votes away from a win. The fight over those 20 votes lasted for months: Republicans said Tilden votes in disputed southern states were the result of fraud. The election was decided by a commission of 15: five Senators, Representatives, and Supreme Court Justices. On the eve of the inauguration, they awarded all 20 votes to Hayes.
Republicans had made a deal: they agreed to end the post Civil War federal oversight of the south called Reconstruction. The southern Democrats were then able to halt the participation of former slaves in government and society with "Jim Crow" laws.