Thomas Jefferson (VP: Aaron Burr) defeated John Adams (VP: Charles Pinckney) after losing to John Adams in 1796. Although John Adams and Charles Pinckney clearly lost, Thomas Jefferson and Aaron Burr tied for the most electoral votes, because in those times, electors voted for two names for president. It was arbitrated by the House of Representatives, and Thomas Jefferson became the third president.
During that time, the United States were finishing up with the Quasi-War (1798-1800), an informal war that resulted after the United States refused to pay France back after the French Revolution. The United States argued on the grounds that the money was owed to a previous region, the Ancien Régime. Thomas Jefferson and the Democratic-Republicans argued that the Federalist foreign policy, which wanted to keep fighting France, would oppress the American people. Jefferson also attacked the Alien and Sedition Acts, which punished people who spoke out against the government and made it harder to become a citizen.
Even some Federalists disliked John Adams. At the time, there were two types of Federalists, those that supported Alexander Hamilton, and those that supported John Adams. So, Adams was attacked by the Democratic-Republicans and the "High Federalists", who supported Hamilton.
After the first fifteen states, the two candidates were tied at 65-65. The last state to vote, South Carolina, cast their eight electoral votes for Jefferson and Burr. Back in the day, each elector voted for two candidates, and the Federalists did a good job. 64/65 electors cast their vote for Adams/Pinckney, but 1 elector cast their vote for Adams/Jay (Chief Justice). That way, there wouldn't have been a tie.
The Democratic-Republicans messed up. Someone was supposed to abstain from voting for Burr, but no one did that, so Jefferson and Burr were tied at 73-73. Back in the day, the outgoing Federalist House of Representatives were supposed to decide who would become president.
Contingent Election of 1801
When a winner isn't decided by a regular election, the House elects the president, and the Senate elects the vice president; that's called a contingent election, and it's pretty rare (it also happened in the Election of 1824). In this case, they had to decide who was going to be president and who was going to be vice president. In order to win, one candidate would have to have 9/16 states. If a state is tied, they cast a blank ballot. The Federalists despised Jefferson, who had been the principal opponent of the Federalists since Washington's presidency. In order to deny Jefferson the presidency, most Federalists voted for Burr, giving Burr six of the eight Federalist states. The seven Democratic-Republican states voted for Jefferson, and Georgia's one Federalist elector voted for Jefferson. Two states: Vermont and Maryland both cast blank ballots because they were split (1-1 and 4-4). So, the current result was:
Jefferson: 8, Burr: 6, No result: 2
Over the next week, the House cast 35 votes, with each vote having that result. During that time, Hamilton was actively campaigning in favor of Jefferson. Hamilton said that he would rather have someone with wrong principles than someone devoid of any. On February 17th, the 36th ballot was going to happen. James Bayard, the sole Representative from Delaware changed his Burr vote to a blank ballot and convinced his Federalist allies in Maryland and Vermont to cast blank ballots. This resulted in Vermont and Maryland to vote for Jefferson, because the votes were now 1-0-1 and 4-0-4, respectively. In addition, the four Federalist electors from South Carolina changed their votes from Burr to a blank ballot. So, Burr lost two states: Delaware and South Carolina, which changed to "No result", and two "No Result" states, Maryland and Vermont, ended up voting for Jefferson. So, the final and 36th vote was:
Jefferson: 10, Burr: 4, No result: 2
Because of James Bayard, Jefferson assumed the presidency, and Burr was became the vice president. John Adams' career in politics ended, and this election killed the Federalist policy. Although the party didn't completely die off in Congress, John Adams was the last Federalist president, and this election was a realigning election. In other words, up until that point, the majority of America was Federalist, but after that, the majority became Democratic-Republicans.
After the complications with this election, the Twelfth Amendment was passed. It said that electors had to vote for a President-VP pair instead of voting for two candidates. The 12th amendment was ratified before the next election, and that issue was resolved.
Charles Pinckney ran for president two more times, with Rufus King as his running mate twice. In 1804, he ran against Jefferson (VP: George Clinton) and lost by a landslide. In 1808, he ran against James Madison (VP: George Clinton) and lost by a lot again. Overall, the election of 1800 was a turning point in American politics; it was the first realigning election, and it forever changed the electoral process.