Love him or hate him, Donald Trump accomplished a feat Tuesday night that only four other presidents have in America's history: he was elected despite losing the popular vote.

Not much needs to be said about last night's election considering the nation watched it unfold less than 24 hours ago, but here's a quick recap. Leading up to the voting day, pollsters all but locked up the race for Democratic nominee Hillary Clinton. After a strong week of rallies with some of the country's biggest stars, she had the swing states sewn up. Or so people thought.

President-elect Trump ultimately won 290 electoral votes to Clinton's 232 Tuesday night, yet is projected to lose the popular vote by 1.2 percentage points.

This isn't the first time this has happened, though. There have been four other presidents in the nation's history who have lost the popular vote and gone on to win.

The election of 1824 was, by most accounts, unusual. There were four major candidates from the Democratic-Republican Party (the Federalist Party had since gone away, which led to years of a one-party system): Andrew Jackson, whose faction later created the Democratic Party; John Quincy Adams and Henry Clay, who later led the charge in the creating the National Republican Party; and, finally, William Crawford.

The election was historic on two accounts. First, it was the only election decided by the House of Representatives and not the Electoral College. At the time, 131 electoral votes were needed to win, and the candidate closest to that number was Andrew Jackson with 99 votes. Secondly, it was the first time in history that the candidate who won the popular vote, also Jackson, wasn’t elected president.

Ultimately, Adams went on to win the election.

Years later, in 1876, Republican candidate Rutherford B. Hayes squeaked by Democratic candidate Samuel Tilden. Before the official electoral tally, 20 votes were in dispute because of how close they were. Hayes was ultimately awarded those electoral votes, bring his total to 185.

Many historians believe an informal deal was struck to resolve the dispute – the compromise of 1877. Regardless, it was Tilden who won the popular vote by 3 percentage points.

Then there was the race of 1888, which wasn't close in the Electoral College. Republican candidate Benjamin Harrison won 233 electoral votes to President Grover Cleveland’s 168. Still, Harrison lost the popular vote to Cleveland by 0.8 percent.

And who could forget the race between George W. Bush and then-Vice President Al Gore? The 2000 election is one of the more historic elections in American history—mostly because of the controversy surrounding Florida.

The race in Florida was so close that there was a recount for the state’s 25 electoral votes. Bush ultimately won Florida, narrowly getting by with 271 electoral votes to Gore’s 266. Gore went on to win the popular vote by 0.5 percent.

It was the closest election since 1876.