Democrats will win control of the House, a triumph that gives the party real levers of power to check President Donald Trump and Senate Republicans, NBC News projects.

The party leveraged voter enthusiasm and staggering fundraising to tip the balance of power in the chamber. As of 5:20 a.m. ET Wednesday, Democrats had gained a net 28 seats in the chamber, NBC said. They needed to flip 23 GOP-held seats to take over.

The victory will put Democrats in control of the House for the first time since 2010 and likely return House Minority Leader Nancy Pelosi to the office of speaker.

The victory came even as Republicans were projected to keep control of the Senate, according to NBC. The election landscape diverged as Democrats defended several Senate seats in deep red territory. Democrats picked up House districts in states such as Pennsylvania, New Jersey, Virginia, Michigan and Kansas on their way to a projected majority.

"Tomorrow will be a new day in America," Pelosi said in a speech declaring victory late Tuesday night. "Today is more than about Democrats and Republicans. It's about restoring the Constitution's checks and balances to the Trump administration."

Despite his party's expected loss of House control, Trump tweeted late Tuesday touting what he called "tremendous success" in the elections. He added: "Thank you to all!"

The expensive and bitter midterm victory will have widespread implications for Trump and the lawmakers in his Republican Party. Democrats will now have the ability to launch investigations into the president and his Cabinet members. They appear poised to go after the president's elusive tax returns. They also could pass legislation aimed at protecting special counsel Robert Mueller's probe.

The party will also have the ability to check the GOP on economic issues such as taxes and health care. But the shift in power also opens the door to cooperation on reducing drug prices or improving infrastructure, the latter of which may prove as difficult as it has so far in the Trump administration. Pelosi identified both issues as priorities in her speech Tuesday night.

It remains to be seen whether Democratic leaders push for Trump's impeachment — which they avoided as they tried not to fuel Republican enthusiasm during the midterms. It could depend on what Mueller's Russia probe, or the Democrats' own investigations, uncover. Pelosi, for her part, touted national unity on Tuesday.

"A Democratic Congress will work for solutions that bring us together. Because we have all had enough of division. Because we have all had enough of division," she said.

Democrats' actions while in control of the House will help to shape how voters across the country view the president and whether they will support him in his re-election bid a mere two years away.

Trump and the GOP tried to stop a Democratic takeover of the House by tying candidates across the country to Pelosi. They also warned of the party's potential attempts to pursue single-payer health care and stoked fears about illegal immigration in the election's final stretch.

In key swing districts from Pennsylvania to Kansas and California, Democrats tried to keep the focus on health-care policy and the social safety net. They warned about Republican attempts to repeal and replace the Affordable Care Act, and the potential to cause people with pre-existing conditions to lose insurance coverage.

They also took every opportunity to stir concerns about Republicans using their tax cuts passed last year as justification to trim funds from Social Security, Medicare and Medicaid.

A record flow of cash — from both individuals and outside political action committees — helped Democrats to spread their message. Small donors fueled a fundraising advantage for Democratic campaigns in most battleground House districts, forcing national GOP organizations to spend heavily to keep up.

Overall spending in the midterms was projected to reach $5.2 billion, about $1 billion more than any previous midterm, according to the Center for Responsive Politics.

Pelosi spelled out her plans for a Democratic majority well before Tuesday's vote. She identified potential proposals to reduce corruption and money in politics, cut drug prices, strengthen gun background checks and pass legal protections for young immigrants brought to the U.S. illegally as children. It is unclear how much of that agenda they can accomplish with Trump in office.