With control of Congress, statehouses and the president's agenda at stake, some of the nation's top elections were too close to call. Democrats will win at least 39 seats, according to projections, leaving 11 contests undecided.
Republicans are expected to retain their slight majority in the Senate, now at two seats, which would let them retain the power to approve US Supreme Court and other judicial nominations.
Democrats lost 63 seats in 2010 with Barack Obama in the White House, handing control to the Republicans, who brought Obama's agenda largely to a halt.
"It's a huge moment and victory for the president", Press Secretary Sarah Huckabee Sanders told reporters at the White House Tuesday night. I really think it's more than just about a specific issue.
Nearly a quarter of voters considered immigration to be the top issue, while another one-fifth said it was the economy.
Democrats also could recapture governor's offices in several battleground states such as Michigan, Wisconsin and OH, a potential help for the party in those states in the 2020 presidential race.
The political and practical stakes were sky-high.
Under a Democratic-controlled House, Democrats will have more authority and fewer constraints on their ability to exercise oversight of the Trump administration and could launch investigations into the President's finances, including going after his tax returns, as well as ramp up a probe into the possibility that the Trump campaign colluded with the Russian government to win the White House, which Trump has denied.
Said Trump adviser Kellyanne Conway: "I don't know that there will be much of an appetite for Democrat lawmakers to spend all of their time, or most of their time or even a fraction of their time investigating, instigating, trying to impeach and subpoena people".
Some Democrats have already vowed to force the release of his tax returns. Although some Republicans may blame him for Tuesday's losses, they are unlikely to be emboldened to rebel, especially given that the party kept control of the Senate.
Moreover, Trump's fiercest Republican critics in the Senate, Bob Corker and Jeff Flake, are retiring. Marsha Blackburn triumphed in Tennessee.
In the leadup to the election, Republicans privately expressed confidence in their narrow Senate majority but feared the House could slip away.
In Indiana, 7 in 10 registered voters who chose not to vote in the midterm election were younger than 45. More than 40 million Americans had already voted, either by mail or in person, breaking early voting records across 37 states, according to an AP analysis.
Priyanka Chopra Throws A Pyjama Bachelorette Party! View Pictures
PeeCee and Nick got engaged in Mumbai and will reportedly get married in a traditional Hindu ceremony this year in Rajasthan. She was joined by her cousin Parineeti Chopra and her future sister-in-law and " Game of Thrones " actor Sophie Turner .
Almost 40 percent of voters cast their ballots to express opposition to the president, according to AP VoteCast, a national survey of the electorate, while about 25 percent said they voted to express support for Trump.
Overall, 6 in 10 voters said the country was headed in the wrong direction, but roughly that same number described the national economy as excellent or good. Voters scored Trump positively on the economy and for standing up "for what he believes in".
He bet big on a xenophobic closing message, warning of an immigrant "invasion" that promised to spread violent crime and drugs across the nation.
Trump's scorched-earth campaigning came to define the 2018 campaign.
The first national elections since Trump captured the White House in a stunning 2016 upset is a referendum on the polarising president and a test of whether Democrats can turn the energy of the liberal anti-Trump resistance into victories at the ballot box.
Democrats needed to pick up two dozen seats to seize the House majority and two seats to control the Senate.
Democratic incumbents did manage to hold on, however, in Wisconsin and West Virginia, with senators Tammy Baldwin and Joe Manchin coming out victorious in states Republicans won in 2016. The Justice Department dropped the charges after his trial ended in an hung jury. In fact, he may find it more politically effective to have House Democrats as a foil. Rep. Andy Barr won reelection against Amy McGrath in Kentucky's Sixth Congressional District.
Meanwhile, several 2020 presidential prospects easily won re-election, including Sens. House Majority Whip Steve Scalise may also be interested in climbing the GOP leadership ranks though he has said he would not challenge McCarthy in a race for speaker. He and the first lady were to host an evening watch party for family and friends. And on Wednesday, he said she deserves to be House speaker. A wide share of those who did not vote - more than 8 in 10 - did not have a college degree.
The demographic divides were coloring the political landscape in different ways. It deals a major blow to Republicans who will lose their majority in the lower chamber and is a significant setback for President Donald Trump's agenda in Congress.
Trump also could face more pushback from Democrats on trade tariffs he has introduced, particularly in farm states hard hit by retaliatory measures from China or manufacturing states hit by higher steel and aluminium prices. Heidi Heitkamp in North Dakota.
The White House for days has stressed the historical headwinds it faced: In the last three decades, 2002 was the only midterm election when the party holding the White House gained Senate seats.
Three states could elect their first African-American governors, while several others were running LGBT candidates and Muslims.