In 1876 the Electoral College made Hayes president in one of the most contentious elections in U.S. history. He lost the popular vote to Democrat Samuel J. Tilden, but won an intensely disputed electoral-college vote after a Congressional commission awarded him 20 contested electoral votes.