We’ve experienced some extremely close elections (and caucuses) in recent years, but controversy over candidates who are elected by the skin of their teeth is nothing new. In fact, it dates back to our founding fathers: In the election of 1800, we came this close to electing President Aaron Burr instead of President Thomas Jefferson.

The election took place just three years after George Washington’s final term, and there were four men running for president. Incumbent John Adams was trying again, along with his Vice President, Thomas Jefferson—but not on the same ticket. Adams chose Charles Pinckney as his running mate, while the Republicans designated Aaron Burr as their second choice.

The process for choosing a vice president was very different back then. Instead of automatically electing the chosen running mate as we do today, the custom was to award the man with the most electoral votes the presidency, and the man with the second-most votes the vice presidency. Party lines and “official” running mates didn’t matter, which is how Federalist John Adams ended up with Democratic-Republican opponent Thomas Jefferson as his second-in-command after the 1796 election.

When the votes were cast on November 4, 1800, Jefferson and Burr were handed a decisive victory. While this would ordinarily be great news for Jefferson’s Democratic-Republican party, there was a problem: Both he and Burr had received exactly 73 electoral votes.

On Wednesday, February 11, 1801, the House of Representatives met to break the tie. The first ballot was deadlocked—Jefferson needed a nine-state majority to win, but only received eight. Burr received six, and two states remained undecided. They reached deadlocked results on the second vote, and then a third. Several days later, more than 30 ballots had been cast with neither candidate achieving the majority. If no solution was reached by the end of Adams’s term on March 4, the U.S. would be down one commander-in-chief until Congress could get it figured out when they convened in December. As you might imagine, nine months is a long time for any country to go without a leader, let alone a country as new as the U.S. was at the time.

It wasn’t until February 17 that the House finally had a breakthrough when a group of Federalists decided that they needed to acquiesce in order to ensure a peaceful transfer of power. That's the official story, anyway—there's some speculation that Jefferson did some wheeling and dealing in order to secure the presidency. Whatever happened, the result of ballot #36 was 10 votes for Jefferson, four for Burr, and two undecided.

Thomas Jefferson was inaugurated about two weeks later on March 4, becoming the third president of the United States, with Burr his second-in-command. During his tenure as Vice President, Aaron Burr fatally shot Alexander Hamilton during their infamous duel. He didn’t run for a second term, and was later charged with treason over a separate conspiracy.

No mention of the Burr-Hamilton duel is complete without a mention of this commercial, by the way, so I'll leave you with this: