This scenario is called a contingent election, and it has happened before in U.S. history.
WASHINGTON — To secure the White House, a presidential candidate needs to win a majority of electoral votes — at least 270.
While unlikely, it is possible that no single candidate wins enough Electoral College votes to win the presidency, whether through a 269-269 tie or because a third-party candidate secured enough electoral votes to deny the Democratic and Republican candidates an outright win. This scenario is known as a "contingent election," and the U.S. Constitution describes the plan for when that happens.
What happens if nobody gets 270 electoral votes?
In the case of an Electoral College tie, the newly-elected members of the House of Representatives step in to determine the winner, according to the 12th amendment. The Senate decides the vice president.
For the House vote, it's not as simple as each representative voting for their preferred candidate. Each state's House delegation receives one combined vote. The candidate who receives a majority of state votes (26) becomes the president. Currently, Republicans have a majority in 26 state House delegations and Democrats have a majority in 21. Three states are evenly split: Minnesota, Michigan and Pennsylvania.
The vice president is decided by the Senate with a simple majority vote. Each senator gets one vote.
If the House vote ends in a tie, representatives are instructed to keep at it until one state flips. If there is no decision by Inauguration Day, the vice president-elect becomes acting president until the House breaks the tie.
Has there ever been a presidential election decided by the House?
There was an Electoral College tie 224 years ago, when Thomas Jefferson defeated Aaron Burr in 1800. Jefferson and Burr were both part of the Democratic-Republican Party and finished in a 73-73 tie before the House gave the win to Jefferson.
John Quincy Adams defeated Andrew Jackson in 1824, with both again representing the Democratic-Republican Party. Jackson had more electoral and popular votes than Adams, but neither had a majority because others also received electoral votes. The House gave the election to Adams.