I am sure you are familiar with the career of the 19th President of the United States, Samuel Tilden. He won the 1876 election, gathering more popular votes and more electoral votes than his opponent, Rutherford Hayes.
This was only a few years after the end of the Civil War, and sentiment still ran high, especially in the South. Reconstruction was still in effect, and federal troops were in place in many areas of the South. Three states, Florida, Louisiana, and South Carolina, sent two sets of ballots to the Electoral College, one set for Tilden and one set for Hayes.
This created a real puzzle for Congress. There was no process specified by law to determine which set of ballots to accept. They did what Congress really loves to do; they appointed a commission to solve the problem. It contained 15 members, which were at first seven Democrats, seven Republicans, and one independent. However, the independent, David Davis, had just won election to the Senate, and he turned down the appointment. His replacement was a Republican.
Tilden had 184 electoral votes. He needed 185 to become President. If the commission had ruled in his favor on the ballots from just one of the three states, he would have won. However, the commission voted along party lines, and all of the Republican sets of ballots were certified by a vote of eight to seven. Rutherford Hayes became President.
Many Democrats were outraged, and there were plans made to try to overturn the commission’s findings. Tilden took it all gracefully, commenting that he could have the satisfaction of having won election to the highest office in the land, and yet would not have to trouble himself with the cares and responsibilities of that office.
Notice the remarkable similarities between the election of 1876 and the election of 2000. In both cases, the Democrat won the popular vote, and a fair and complete assessment would have awarded him the victory. Republicans used political chicanery to get a decision in favor of their candidate, and the Democratic candidate was graceful in accepting defeat.