Think the 2000 election between Al Gore and George W. Bush was messy? On this day in 1876, an even more controversial election was held, and when it was finally over, the man who got the both the most popular votes AND electoral votes wound up the loser.

So what happened? In addition to snagging 51 percent of the popular vote, Samuel Tilden, the Democratic governor of New York, won 184 electoral votes — one short of winning the White House. His rival, the Republican governor of Ohio, Rutherford B. Hayes, won just 47.9 percent of the vote and 165 electoral votes. Here's the catch: Twenty other electoral votes in several states were disputed and went uncounted. The states: Florida, Louisiana, South Carolina, and Oregon.

In all three southern states, it looked like Tilden won the popular vote. But there were allegations of fraud (ink-smeared ballots and bribery) and voter intimidation that kept, some said, voters away. Chaos ensued. In Florida, for example, the Republicans said they won by 922 votes. Democrats say they did — by 94 votes.

Meantime, in Oregon, both Democrats and Republicans agreed that Hayes won the state. But when the Democratic governor found out one Republican member of the electoral college was a federal worker (a postmaster) employee and ineligible to serve, he replaced him — with a Democrat. The Republican elector promptly resigned his post office job and said that as a private citizen, he would cast his electoral college vote for Hayes.

Wait, there's more. All four states — Florida, Louisiana, South Carolina, and Oregon — submitted two sets of electoral vote counts each to Congress, all with different results. To untangle the mess, Congress set up, in January 1877, an electoral commission: Five members of the House, five members of the Senate, and five Supreme Court justices.

By the way, there's absolutely nothing in the Constitution saying this is how an election standoff was to be resolved. After much maneuvering, the commission voted along party lines — 8 to 7 — to award the disputed electoral votes, and the presidency, to Hayes.

But it still wasn't over. Democrats threatened to filibuster the counting of electoral votes to keep Hayes from winning. In 1877 — just weeks before inauguration day — Democrats gave in, with one big string attached. Republicans must agree, they said, to withdraw all federal troops fro the south — this was just a decade after the civil war. The GOP agreed — and thus the Compromise of 1877.

November 7, 1944: Franklin Roosevelt was elected president for the fourth time. After his death, the 22nd Amendment was passed, limiting a president's tenure to two terms.

November 7, 1967: President Johnson signed the Public Broadcasting Act, establishing the Corporation for Public Broadcasting.

November 7, 1973: Congress overrode President Nixon's veto of the War Powers Act, which limits a president's power to wage war without Congressional approval.