As no presidential candidate received a majority of electoral votes in the election of 1824, the U.S. House of Representatives votes to elect John Quincy Adams, who won fewer votes than Andrew Jackson in the popular election, as president of the United States. Adams was the son of John Adams, the second president of the United States.

In the 1824 election, 131 electoral votes, just over half of the 261 total, were necessary to elect a candidate president. Although it had no bearing on the outcome of the election, popular votes were counted for the first time in this election. On December 1, 1824, the results were announced. Andrew Jackson of Tennessee won 99 electoral and 153,544 popular votes; John Quincy Adams of Massachusetts received 84 electoral and 108,740 popular votes; Secretary of State William H. Crawford, who had suffered a stroke before the election, received 41 electoral votes; and Representative Henry Clay of Kentucky won 37 electoral votes.

As dictated by the U.S. Constitution, the presidential election was then turned over to the House of Representatives. The 12th Amendment states that if no electoral majority is won, only the three candidates who receive the most popular votes will be considered in the House.

Representative Henry Clay, who was disqualified from the House vote as a fourth-place candidate, agreed to use his influence to have John Quincy Adams elected. Clay and Adams were both members of a loose coalition in Congress that by 1828 became known as the National Republicans, while Jackson’s supporters were later organized into the Democratic Party.

Thanks to Clay’s backing, on February 9, 1825, the House elected Adams as president of the United States. When Adams then appointed Clay to the top Cabinet post of secretary of state, Jackson and his supporters derided the appointment as the fulfillment of a corrupt bargain.

With little popular support, Adams’ time in the White House was for the most part ineffectual, and the so-called Corrupt Bargain continued to haunt his administration. In 1828, he was defeated in his reelection bid by Andrew Jackson, who received more than twice as many electoral votes than Adams.

READ MORE: How Andrew Jackson Rode a Populist Wave to the White House