Tuesday's elections also tested the strength of a Trump-era political realignment defined by evolving divisions among voters by race, gender, and especially education.
With the House possibly decided, during the 10 p.m. hour, the polls close on hotly contested Senate races in Montana and Nevada. "Note that in 2006 when the Democrats picked up 31 seats and took control of the House for the first time since 1994, the Democrats had an advantage of about 12% in generic ballot polls".
If Democrats do win the House, they are expected to launch investigations into Mr Trump's administration and business affairs, from tax returns to potential conflicts of interest, while thwarting his legislative agenda.
A blue takeover of Congress would have been a disaster for the president - and increased the chances of his opponents launching efforts to remove him from office through impeachment.
It was the first national election in the United States since the 2016 race in which Russian Federation interfered, according to US intelligence agencies, with a campaign of hacking and propaganda to sow discord, harm the Democratic presidential candidate and boost Trump's chances. Moscow denies meddling and Trump denies any collusion. Pelosi has said she plans to run for House speaker if Democrats flip the House, but she has also said she views herself as "a transitional figure", fueling speculation about who will one day succeed her and whether she could face a challenge in her bid for the top spot in leadership in a new Congress. "We will strive for bipartisanship", Pelosi told cheering supporters at the Dems' Washington D.C. headquarters tonight in a wide-ranging victory speech "We have all had enough of division", she added with more than a few swipes at the notoriously thin skinned Trump.
Despite his party losing the House, Trump wrote on Twitter, "Tremendous success tonight".
Trump called Pelosi, Senate Republican leader Mitch McConnell, Senate Democratic leader Chuck Schumer and several of the Republican winners. In the final stretch, Trump hardened his rhetoric on issues that appealed to his conservative core supporters, issuing warnings about a caravan of Latin American migrants headed to the border with Mexico and condemnations of what he called USA liberal "mobs".
The expectation is that Democrats will bring a new level of oversight and investigation of the Trump administration, but numerous candidates ran on issues like healthcare and immigration.
The party of a first-term president tends to lose congressional seats in his first midterm.
Democrats ousted Republicans in suburban districts across the country Tuesday, taking the reins of power in the House and vowing to stand as a check to President Trump's agenda. But the share of the country that could decide control of the House of Representatives might be smaller.
However, Gallup finds that Republicans and "Republican leaners", in contrast, are less anxious about what will happen in the US if Democrats obtain a majority in either house of Congress.
The Republicans held on to the Senate and narrowly survived a number of big individual races, including in Florida. Ted Cruz fended off Democratic challenger Beto O'Rourke, and Tennessee, where Rep. Marsha Blackburn defeated Democrat Phil Bredesen.
Democrats Ilhan OImar and Rashida Tlaib are also expected to make history in Minnesota and MI respectively as the first Muslim women elected to Congress.
The outcome is a significant victory for Democrats after the party was locked out of power in Washington following the 2016 presidential election. It is also possible that there has been another minor polling error replicated across key districts that will swing the result (although this is not as likely in the absence of the electoral college).
Instead, Democrats have said, they'll put forward an infrastructure package meant to tempt some moderate Republicans and the president.
Democrats turned out to register disapproval of Trump's divisive rhetoric and policies on such issues as immigration and his travel ban targeting several Muslim-majority countries. If more than 84 of those women candidates won on Tuesday, it would set a record for the number of women serving in the House.
Democrats now need to win only nine more Republican House seats to reach the net gain of 23 seats they need to secure a majority.
Republicans started 2017 - the beginning of the two-year, 30th Legislature - with a majority in the House.
"We'll just have to work a little bit differently", he told reporters when asked how he'd live with a Democrat-controlled chamber.
The Senate is 14-6 Republican.
Secondly, the surprise election of Trump in 2016 was the result of a few thousand votes being cast for him unexpectedly in Midwestern states that won him the electoral college.
A CNN/SSRS poll released Monday showed Democrats with a gaping 55% to 42% lead over Republicans among likely voters in a generic congressional ballot.