(CNN) Democrats on Tuesday captured the House of Representatives and are set to exert a major institutional check on President Donald Trump, while breaking the Republican monopoly on power and ushering in a younger, more female and more racially diverse political generation.

But the GOP solidified their Senate majority after an acerbic midterm election that enshrined America's deep divides and shaped a highly contentious battleground for the stirring 2020 presidential race.

The opposite trends in the House and the Senate underscored a political and cultural gulf among diverse and affluent liberals living in big cities and their suburbs and the mostly, white, working class and rural conservative bloc of voters for whom Trump remains an iconic figure.

In his first reaction to a mixed night, Trump chose to celebrate Republican successes even though the loss of the House meant his record of busting political convention could not defy the traditional first-term midterm curse faced by many of his predecessors.

"Tremendous success tonight. Thank you to all!" he tweeted.

More reaction is sure to come from Trump as he is scheduled to hold a news conference at 11:30 a.m. ET in the East Room of the White House.

But the new Democratic House will pose a perilous problem for the President, who must now brace for the novel experience of oversight from Capitol Hill with Democratic committee chairs promising constraints on his power that the GOP never attempted.

Nancy Pelosi, the former House speaker who is in position to lead again, pledged that the new majority would work to rein in the White House as well as to improve health care, lower the cost of drugs and protect millions of Americans with pre-existing conditions.

"Today is more than about Democrats and Republicans. It is about restoring the Constitution's checks and balances to the Trump administration," Pelosi said.

Democrats could win more than 30 seats in the House, above the net gain of 23 seats that they needed to take control for the first time in eight years. But they lost significant ground in the Senate, losing incumbents in Missouri and Indiana and North Dakota, where Trump is still wildly popular. With several races too close to call, the GOP advantage was expected to grow.

And liberal hearts were broken in several closely fought marquee races, including Andrew Gillum's failure to become Florida's first African-American governor and rising star Beto O'Rourke's failed bid to unseat Texas Sen. Ted Cruz. O'Rourke's narrow defeat, however, proved his ability to compete even in conservative territory and he will get buzz as a potential 2020 presidential candidate.

Democrats dare to dream again

Two years after the trauma of Trump's shock defeat of Hillary Clinton, Democrats could dare to dream again.

They won the House, which will change hands for the third time in 12 volatile years, by performing strongly in suburban areas where Trump's flaming rhetoric is toxic. They also attracted a higher proportion of younger voters than at the last midterm elections four years ago and will change the face of Washington.

"We have the beginning of a new Democratic Party, younger, browner, cooler, more women, more veterans, can win in Michigan, can win in Pennsylvania, can win in Ohio," said Van Jones, a CNN political commentator.

"It may not be a blue wave, it's a rainbow wave," he said.

One potential pitfall for Democrats will be to hold Trump to account without being seen as overreaching. After all, some presidents, including Bill Clinton and Barack Obama, had tough midterm elections but leveraged attacks by Capitol Hill foes to help them win re-election. Trump, who loves nothing more than to identify new enemies, will be a formidable opponent.

Within minutes of their victory being confirmed, other Democrats were already threatening to go after Trump and to probe his business interests, including his tax returns.

Democratic Rep. Jerrold Nadler, who is slated to steer the House Judiciary Committee, warned that the election was about accountability for Trump.

"He's going to learn that he's not above the law," Nadler told CNN.

The race they ran

The contradictory message sent by voters on Tuesday night recalls Clinton's win in the popular vote but defeat in the Electoral College and underlines the split down the middle of American politics.

Republicans performed strongly in the deep red states where Trump mounted a frenetic final campaign blitz and proved that despite his low approval rating he remains a potent political force among conservatives.

In nearly every state with a key contested Senate or governor's race, the President had a positive approval rating over 50%, according to CNN's preliminary exit poll data.

Keeping hold of the Senate is especially important for Trump, since it will allow him and Senate Majority leader Mitch McConnell to press on with one of his major legacy-building initiatives, restocking the federal judiciary with conservatives.

Tuesday's Senate victory marks another triumph for the canny Kentuckian, follow his piloting of Trump's two nominees onto the Supreme Court to construct what could be a generational conservative majority.

Still, Trump will also have to answer for a scorched-earth campaign on immigration in the final days that might have helped tip the House to Democrats, even if he can argue that his magnetism helped push other candidates, such as Rep. Ron DeSantis, who won the Florida gubernatorial race, across the finish line.

Other Trump favorites include Marsha Blackburn, who will capture the Tennessee Senate race, and Mike Braun, who defeated the incumbent Democratic Sen. Joe Donnelly in Indiana. Trump also helped topple another foe, Democratic Sen. Claire McCaskill in Missouri.

The loss of the House spells the end of a political era for Republicans who rode into town on a Tea Party wave whipped up by fury over Obamacare and huge government spending in the wake of the Great Recession.

The Republican majority will leave town with Obamacare still the law of the land and with a deficit going through the roof on the back of GOP tax cuts.

In theory, the new Democratic majority would have the capacity to initiate impeachment proceedings against Trump, should there be sufficient grounds uncovered in Robert Mueller's special counsel investigation. Though the Republican gains in the Senate make it even less likely that there would be a two-thirds majority needed to convict a president and evict him from office.

But if they take a cautious approach, Democrats could face a backlash from their own base voters who have been electrified in opposition to Trump. In exit polls, 77% of self-identified Democrats supported impeachment.

What is next for Trump?

Much will depend on how Trump reacts to what is undeniable a rebuke from voters two years into a presidency that has unfolded in institutional chaos, torn at racial and cultural divides and often trampled on truth and facts.

Given his history and personality, it seems unlikely the President will reflect on the cultural warfare that he waged in the dying days of the campaign and change his approach. Indeed, he may conclude that exactly that kind of approach was behind a better-than-expected GOP performance in Senate races.

But critics will argue that his incessant concern with bolstering the support of his most vehement supporters and angry tirades risks deepening the damage suffered among college-educated female voters especially, in a way that could severely compromise his hopes of winning re-election in two years.

The President watched the results after having dinner with his family in the residence of the White House.

He was joined by Republican megadonor Sheldon Adelson, Blackstone CEO Stephen Schwarzman and the President's ex-campaign aides, David Bossie and Corey Lewandowski, a source familiar with the guest list said.

Two other sources close to the White House said that Trump is already blaming retiring House Speaker Paul Ryan for the loss of the House.

"He is really angry at Ryan," one source said, on "everything."

Drew Hammill, an aide to Pelosi, tweeted Tuesday evening that the President called Pelosi at 11:45 p.m. ET "to extend his congratulations on winning a Democratic House Majority."