Democrats flipped the House of Representatives Tuesday, seizing control of the chamber for the first time since before the 2010 midterms and giving the party some sorely needed leverage in Washington.

The Dems came into the day needing to wrest a net total of 23 seats from the Republicans to cement a majority of 218 seats or more in the House — a tally that was well in hand after winning the 16 competitive races considered to be at least leaning left.

A handful of upsets, including Democratic upstart Max Rose’s unexpected toppling of Dan Donovan in New York’s 11th Congressional District, covering stretches of Staten Island and Brooklyn, were icing on the cake. “Tomorrow will be a new day in America,” crowed Democratic House leader and presumptive Speaker Nancy Pelosi at a DC victory party.

But in a fiercely contested midterm election that even President Trump acknowledged was a referendum on the first two years of his presidency, Republicans didn’t go down without a fight — capturing a handful of coin-flip districts to fend off a Democratic blowout. The race for House control included several outcomes of note:

An early Democratic flip came in Virginia’s 10th Congressional District, where state senator and former prosecutor Jennifer Wexton toppled Republican Barbara Comstock. The race, which was expected to tip in the Democrats’ favor, saw both candidates campaign in the historically purple state as “bipartisan” options, but it was Wexton who leaned harder into the race as a referendum on Trump and won. “I don’t like the way he talks about people, women and race,” said Wexton. “He’s divided the country.”

The Democrats picked up a seat in Florida’s 27th District, as Donna Shalala, who served as secretary of Health and Human Services under President Bill Clinton, won a face-off with Maria Elvira Salazar to replace retiring GOP Rep. Ileana Ros-Lehtinen. Democrats were optimistic about their chances to take the seat after Hillary Clinton carried the district by nearly 20 points in the 2016 presidential race.

Colin Allred, former special assistant to the counsel general of Housing and Urban Development in the Obama administration, ousted GOP incumbent Pete Sessions in Texas’ 32nd District. The district, which includes the North Dallas, home of President George W. Bush, narrowly went for Hillary Clinton in the 2016 presidential race and was forecast as a toss-up.

In Oklahoma, Democratic longshot Kendra Horn had one of the night’s biggest upsets, cinching Oklahoma City’s 5th District for her party for the first time since 1975. The lawyer, who didn’t even win her party’s nomination in June and garnered scant support from national Democratic groups, rallied a grass-roots campaign that toppled incumbent Rep. Steve Russell in a 51-49 percent nail-biter.

Former Navy helicopter pilot and federal prosecutor Mikie Sherrill captured New Jersey’s 11th Congressional District for the Democrats, edging out the GOP’s Jay Webber in a race to replace retiring Republican fixture Rodney Frelinghuysen. The affluent district, which includes Trenton, has been a GOP bastion but was projected to tip Democrat amid changing ­demographics.

Elsewhere in the Garden State, former State Department official Tom Malinowski unseated Republican Leonard Lance in the state’s 7th District. The onetime Republican stronghold in the state’s well-off northern and central suburbs was up for grabs thanks to tepid reaction to Trump’s first two years and diversifying demographics.

In a race considered to be a toss-up, Democratic challenger Debbie Mucarsel-Powell edged out Republican incumbent Carlos Curbelo to take Florida’s 26th District, covering the Keys and suburban Miami. The district was an oddity as one of just 23 districts to back Hillary Clinton in the 2016 election but to have Republican representation in Congress. Curbelo tried to shift toward the center to stay afloat in the fence-riding district, but it wasn’t enough to edge out Mucarsel-Powell, a fundraising consultant.

In another projected neck-and-neck race, South Carolina’s coastal 1st District, which includes Charleston, went for Democrat Joe Cunningham. He had been locked in a tight battle with Republican Katie Arrington, who won her party’s nomination over incumbent Mark Sanford, a frequent Trump critic who found himself branded as “very unhelpful” and “nothing but trouble” by the president.

Even with the House lost, Republicans mitigated the damage by grasping a few toss-up districts, such as Kentucky’s 6th, representing Lexington. GOP incumbent Andy Barr fended off a spirited challenge from retired Marine Lt. Col. Amy McGrath, the first woman to fly an F-18 combat mission for the Marine Corps. The race in ruby-red Kentucky was seen as a bellwether on whether Democrats would edge out a majority or run up the score.

Just months after five former Ohio State University wrestlers accused him of turning a blind eye to sexual-misconduct allegations against a team doctor, GOP incumbent Jim Jordan held on in the state’s 4th District. Jordan cruised to his seventh term, fighting off Democrat Janet Garrett. Jordan denied wrongdoing, and received a vote of confidence from Trump. “Jim Jordan is one of the most outstanding people I’ve met since I’ve been in Washington,” the president said.

With Wires