Final answer:
Rutherford B. Hayes won the hotly-disputed election of 1876 through a combination of a favorable decision by a specially created electoral commission and backroom negotiations known as the Compromise of 1877, which led to his winning the necessary electoral votes despite losing the popular vote.
Step-by-step explanation:
The election of 1876 was one of the most contentious and complex presidential elections in American history. Despite Democrat Samuel J. Tilden winning the popular vote, the result of the Electoral College was in dispute. The key to Rutherford B. Hayes' victory lay in the contested electoral votes from Florida, Louisiana, and South Carolina. Due to accusations of voter fraud and intimidation, the validity of these states' votes came into question.
A special electoral commission was created by Congress to resolve the deadlock, consisting of senators, representatives, and Supreme Court justices. The commission, which voted along party lines, eventually declared Hayes the winner of the electoral votes in dispute, leading to Hayes defeating Tilden in the electoral vote by a count of 185-184. Moreover, the behind-the-scenes agreement known as the 'Compromise of 1877' played a crucial role. Hayes informally agreed to withdraw federal troops from the South, which appeased enough Southern Democrats to avoid a filibuster in Congress and thus secured Hayes' presidency. Shortly after taking office, Hayes ended Reconstruction as promised.