But there was some satisfaction among Trump and his aides that the losses were not as bad as had been projected by strategists who said a Democratic "blue wave" would take away 40 House seats. The dollar was slightly weaker against a basket of currencies. "If that happens, then we're going to do the same thing and government would come to a halt and we're going to blame them".
Nina McLaughlin, a spokeswoman for the Maine Republican Party, said party officials were not immediately prepared to issue a statement on the election results. They also intend to press for infrastructure investment and legislation to control the climbing costs of prescription drugs - initiatives that will test whether Trump is willing to work with them.
Americans voted on Tuesday in an election that is seen as a referendum on President Donald Trump's first two years of a four-year term.
College-educated voters in the suburbs rejected his warnings of a migrant "invasion". But blue-collar voters and rural America embraced his aggressive talk and stances.
As this was the region that was seen as one which gave Trump the presidency, the deep rejection of the GOP there has to be seen as a unsafe development for the president.
He had some kind words for Pelosi, who with her party capturing the majority of seats Tuesday stands to become the next Speaker of the House. "She has earned this great honor!"
But the Democrats' edge is narrow. House Speaker Sara Gideon, D-Freeport, who won re-election to her House District 48 seat with almost 80 percent of the vote, said Democrats believed they would hold 89 seats once the final tallies are in.
The president's party will maintain control of the executive branch of the government, in addition to the Senate.
The Democratic majority in the lower chamber will be in a position to block Mr Trump's legislative programme.
Senate Majority Leader Mitch McConnell, with a rare smile and spring in his step, made clear Wednesday that he is happy with the outcome of the election that has increased his majority by at least three senators, calling President Donald Trump's efforts "very helpful" with that victory.
And in Virginia, Democrat Abigail Spanberger, a former Central Intelligence Agency official, unseated Representative Dave Brat, a Tea Party darling who himself scored a huge upset four years ago when he defeated his predecessor, Eric Cantor, the Republican leader, in a Republican primary. "His numbers went up and ours went down, and we under-performed in the next election".
The GOP's successes were fuelled by a coalition that's decidedly older, whiter, more male and less likely to have college degrees.
Texas is set to send its first Hispanic women to Congress, as Democrats Veronica Escobar and Sylvia Garcia both won their races.
Record diversity on the ballot may have helped drive turnout.
Voters in Minnesota and MI elected the first two Muslim women to serve in the U.S. Congress: Ilhan Omar, a former refugee who fled Somalia's civil war, and Rashida Tlaib, a Detroit-born Palestinian-American. Kristi Noem won the election to become South Dakota's first female governor. The reason the Republicans wound up gaining seats is because most of those Democratic victories came in states they already held.
In suburban areas where key House races were decided, female voters skewed significantly toward Democrats by a almost 10-point margin.
The GOP also got major wins in toss-up governors races in states like Florida and OH, though Democrats did manage to pick up wins in a number of states like IL and MI. Democrats flipped seats in suburban districts outside of Washington, Philadelphia, Miami, Chicago and Denver.
The Southwest, on the other hand, has never been friendly territory for Trump.
The results were more mixed deeper into Trump country.
Trump held 30 get-out-the-vote rallies in the past two months, including 11 in the last six days across eight states, the last three on Monday when he returned to the White House about 3 a.m. Trump and his daughter Ivanka, a senior White House adviser, both retained their stakes in the property. Democrats suffered losses in Florida and Maryland where Democrats had hoped for pickups.
Some hurt worse than others.
Almost two-thirds said Trump was a reason for their vote.
O'Rourke had told voters that Trump was wrong and described Texas as built from "immigrants, asylum seekers and refugees". The loss of 26 seats in the House, meanwhile, is dwarfed by the 63 seats lost by President Barack Obama in 2010 and the 52 seats lost by President Bill Clinton in 1994.
New York Democratic Governor Andrew Cuomo - sometimes spoken of as a 2020 presidential contender - cruised to a third term.