A short history of the election, an interesting read, no wonder the conspiracy theorists go nuts.
In the few years before the election the Republicans had totally take over the state governments, governors, senators and representatives. Then came the presidential election and when the results came in the Democratic candidate had handily won the popular vote and seemingly the election, but wait, there was a dispute over the electoral votes.
While the Republicans boldly claimed the election, the Democratic candidate mystified and disappointed his supporters by not fighting for the prize or giving any leadership to his advocates. Instead he devoted time to the preparation of a complete history of the electoral counts over the previous century to show it was the unbroken usage of Congress, not of the President of the Senate, to count the electoral votes.
Commissions were formed, courts visited, but in the end Cincinnatian Rutherford B. Hayes claimed victory in the 1876 election over Sam Tilden and upon his defeat Tilden said "I can retire to public life with the consciousness that I shall receive from posterity the credit of having been elected to the highest position in the gift of the people, without any of the cares and responsibilities of the office."
To his credit Tilden didn't begin making mockumentories of the reconstruction or anything like that, but he helped purge the corruption of the nations earliest years from the system so we can all rest in the knowledge these things will never happen again.