Democrats won control of the House of Representatives on Tuesday, riding a wave of energy generated in opposition to President Trump from his first days in office that could power opposition to him on Capitol Hill for the remainder of his term.

After a series of wins down the East Coast and throughout the Midwest, it was clear that Democrats had won the minimum 23 seats to needed to capture the gavel. It was not immediately clear how many more new members could be added to their total, since several seats in California are considered to be toss-up races and those returns will not be in until early Wednesday morning on the east coast, or perhaps later than that.

While Trump boasted of “tremendous successes” late Tuesday, Republicans suffered a slew of defeats in the House. In Florida, GOP Rep. Carlos Curbelo suffered an unexpected loss to Democrat Debbie Mucarsel-Powell for the state’s 26th Congressional District, while Democrat Donna Shalala beat Maria Elvira Salazar to flip a House seat long sought by Democrats.

In a conservative-leaning Virginia district, the Democrat, former CIA agent Abigail Spanberger, pushed GOP Rep. Dave Brat out of the seat he has occupied for two terms.

In a New York race, Democrat Anthony Brindisi unseated Republican Rep. Claudia Tenney in a district Trump had won by 20 percentage points in the 2016 election. Ahead of the vote, Trump had praised Tenney for being “incredible in Congress.”

Another Republican, Rep. Dan Donovan, was ousted by a Democrat in New York’s previously Trump-friendly 11th Congressional District. Democrat Max Rose, an Army veteran, unseated the only Republican member of New York City’s congressional delegation when he beat Donovan on Tuesday night.

Also in New York, Democrat Antonio Delgado was projected to oust incumbent Republican Rep. John Faso in the state’s 19th district to claim a hotly contested seat. With more than 90 percent of the vote late Tuesday, Delgado looked set to be the first Democrat to represent the district since 2011.

In the suburbs outside D.C., Democrats scored similar wins, with Jennifer Wexton flipping a House seat held by Virginia Rep. Barbara Comstock.

In Pennsylvania, Democrat Connor Lamb—once mocked as “Lamb the Sham” by Trump—pulled off a major upset and beat Republican Rep. Keith Rothfus. Lamb, a Marine veteran, claimed 59.4 percent of the vote to claim a seat in the newly drawn 17th Congressional District.

The results already known cap a record setting fundraising haul for Democrats and outside groups supporting their cause. As of election night, a total of $5.2 billion had been spent on the midterms.

In the campaign's closing weeks, Democrats had focused their message on Republican attempts to roll back health insurance for millions of Americans, including those with pre-existing conditions. Winning back the House all but ensures a renewed focus on everything from the release of Trump’s elusive tax returns to investigations into how his administration has handled a range of national issues. It will also severely hobble the administration’s ability to push through their legislative priorities including funding for a U.S.-Mexico border wall.

The Hyatt Regency ballroom erupted in cheers as CNN projected that Democrats had taken the majority in the House of Representatives.

A night that had been at times filled with anxiety gave way to jubilation as Beyonce’s “Run the World” blasted at ear-splitting volumes. The music would only cut out when MSNBC’s Steve Kornacki came back onscreen to provide more good news. Those clutching wine glasses throughout the evening were now hoisting them and hugging people next to them as they awaited to hear from the Minority Leader Nancy Pelosi (D-CA).

The victory will also set off a power struggle within the Democratic ranks. Several members have openly lobbied against Pelosi serving as Speaker of the House for a second time. That said, an alternative that can match her coalition and fundraising prowess has yet to emerge.

Still, as Pelosi took the stage at the Democratic victory party after the House was safely locked down, the crowd could be heard chanting, "Speaker! Speaker!"

—with additional reporting by Allison Quinn and Gideon Resnick