U.S. presidential election, 1876: Just two days before inauguration, the U.S. Congress declares Rutherford B. Hayes the winner of the election even though Samuel J. Tilden had won the popular vote on November 7, 1876.

The 1876 United States presidential election was the 23rd quadrennial presidential election, held on Tuesday, November 7, 1876 in which Republican nominee Rutherford B. Hayes faced Democrat Samuel J. Tilden. It was one of the most contentious presidential elections in American history. Its resolution involved negotiations and compromise between the Republicans and the Democrats.

After U.S. President Ulysses S. Grant declined to seek a third term despite previously being expected to do so, U.S. Representative James G. Blaine emerged as the frontrunner for the Republican nomination. However, Blaine was unable to win a majority at the 1876 Republican National Convention, which settled on Governor Hayes of Ohio as a compromise candidate.

The 1876 Democratic National Convention nominated Governor Tilden of New York on the second ballot.

The results of the election remain among the most disputed ever. Although it is not disputed that Tilden outpolled Hayes in the popular vote, there were wide allegations of electoral fraud, election violence, and other disfranchisement of predominately-Republican black voters. After a first count of votes, Tilden had won 184 electoral votes to Hayes's 165, with 20 votes from four states unresolved. In Florida, Louisiana, and South Carolina, both parties reported their candidate to have won the state. In Oregon, one elector was replaced after being declared illegal for having been an "elected or appointed official." The question of who should have been awarded those electoral votes is the source of the continued controversy.

An informal deal was struck to resolve the dispute. The Compromise of 1877 awarded all 20 electoral votes to Hayes. In return for the Democrats conceding to Hayes's election, the Republicans agreed to withdraw federal troops from the South and to end Reconstruction.The 1876 election is the second of five presidential elections in which the person who won the most popular votes did not win the election, but it was the only such election in which the popular vote winner received an absolute majority, rather than only a plurality, of the popular vote. To date, it remains the election that recorded the smallest electoral vote victory (185–184) and the election that yielded the highest voter turnout of the eligible voting-age population in American history, at 81.8%.Despite not becoming president, Tilden was the first Democratic presidential nominee since James Buchanan in 1856 to win the popular vote and the first since Franklin Pierce in 1852 to do so with an outright majority (in fact, Tilden received a slightly higher percentage than Pierce in 1852 although Pierce had won in a landslide).