John Quincy Adams only got 84 votes, but he won the election in The House of Representatives because of what some people say was a "corrupt bargain".
Even though Andrew Jackson got 99 electoral votes, he lost to Adams in The House because of a "corrupt bargain" between Adams and Clay.
Henry Clay was the Speaker of the House at the time of the election. He had placed fourth, and had been eliminated from the election early on. He used his power as Speaker to strike up a deal with Adams to make him president, and get himself a government position in a "corrupt bargain".