WASHINGTON D.C. (WHTM) — The fourth Presidential election in 1800 was a bit of a mess.

In the first two elections in 1789 and 1792, George Washington was chosen easily because, hey, he was George Washington.

Get daily news, weather, breaking news and alerts straight to your inbox! Sign up for the abc27 newsletters here

But the election of 1796 revealed a flaw in the Constitution.

Article II, Section 1 of the Constitution establishes the office of the President, and details the procedure for selecting the President by the Electoral College. It states the Electors would “vote by Ballot for two Persons.” It goes on to say, “The person having the greatest Number of Votes shall be the President,” and “after the Choice of the President, the Person having the greatest Number of Votes of the Elector shall be Vice President.”

The Founding Fathers had a dim view of organized political parties, and this arrangement reflects that view. It tries to get the best people to serve despite partisan politics. But like it or not, parties formed, and by the 1796 election John Adams was in the Federalist camp, and Thomas Jefferson was with the Democratic-Republicans. (Short synopsis, the Federalists favored a strong Federal government, Democratic-Republicans wanted more power on the State level. We’re still trying to work this one out.)

When the votes were counted, John Adams was President, and his leading opponent, Thomas Jefferson, was his Vice President (neither side had nominated a candidate for Vice-President.)

By the 1800 election, which pitted Adams and Jefferson against each other for a second time, both parties were pretty much solidified, and neither wanted a repeat of 1796. Both fielded blocks of electors and had candidates for both offices. Adams had Charles C. Pinckney as a running mate; Jefferson had Aaron Burr. When the electoral votes were counted, Adams lost to Jefferson 65 to 73, and Pinckney lost to Burr 64 to – whoops! – 73. That’s right, the two Democratic-Republicans were tied for first place.

At this point, under the rules laid out in the Constitution, it fell to the House of Representatives to choose a winner. The fact Jefferson had been specifically nominated for President, and Burr for Vice-President, had no legal bearing on the matter.

On February 11, 1801, the House met to choose the next President. Thus began an epic deadlock. In 1801, there were 16 states. Under the rules laid out in the Constitution, each state had one vote. The Democratic-Republicans, of course, voted for Jefferson as President. But the Federalists, who despised Jefferson for helping found the Democratic-Republican party, voted for Burr. As a result, Jefferson got only eight votes, one short of the majority he needed.

And this went on through 35 ballots.

Enter Alexander Hamilton. Hamilton was one of the founders of the Federalist Party, but had no love for Aaron Burr. (The feeling was mutual. They finally settled matters in 1804.) Hamilton began to work behind the scenes for Jefferson’s election, considering him the lesser of two evils. He persuaded several representatives to change their votes from Burr to “no vote,” and on February 17, 1801, the 36th and final ballot would give the election to Jefferson.

You can read the entire 12th Amendment, click here.

This nasty debacle convinced Congress the method of electing President and Vice President had to change. On December 9, 1803, Congress passed the 12th Amendment, which required the Electoral College to hold two votes, one for President, and one for Vice President.