House Speaker Nancy Pelosi told her fellow congressional Democrats on Thursday their party won “the war” on Election Day, despite Republicans flipping several seats and Democrats' inability, thus far, to gain Senate control.

“This has been a life-or-death fight for the very fate of our democracy,” Pelosi said in a conference call. "We did not win every battle, but we did win the war,” citing Joe Biden’s closing in on the 270 Electoral College votes needed to win the White House.

“In 2018, we won 40 seats," Pelosi said. "We went deep into Trump districts when [President Donald] Trump was not on the ballot. But clearly with Trump on the ballot, we knew it would be a steeper climb.”

With House Republicans performing better than projected in key congressional races, Minority Leader Kevin McCarthy appears to be a lock to stay atop the Republican Conference. Pelosi, meanwhile, could face a surprise uprising among Democrats.

Nancy Pelosi rips up Trump's State of the Union speech On the eve of President Donald Trump'slikely acquittal of his impeachment charges, Speaker Pelosi tore his speech in half just as he concluded with the words, "the best is yet to come." Speaker Pelosi then waved the ripped copy of Trump's speech towards the visitor's gallery. Earlier in the evening Trump appeared to snub Pelosi's offer of a handshake. This wasn't the only act of defiance by Democrats during Trump's contentious State of the U

By Wednesday afternoon, Democrats' only gains were two North Carolina seats vacated by GOP incumbents after a court-ordered remapping made the districts more Democratic. Although their majority seemed secure, the results were an unexpected jolt for a party that had envisioned gains of perhaps 15 seats. They were a morale booster for Republicans, who going into Election Day were mostly bracing for losses.

“They were all wrong,” McCarthy, R-California, told reporters about Democrats' assumptions of adding to their House numbers. Repeating a campaign theme Republicans used repeatedly against Democrats, he said, “The rejection that we saw last night from the Democrats, was that America does not want to be a socialist nation.”

McCarthy also touted his party’s modest additions to its small cadre of female and minority lawmakers. “The Republican coalition is bigger, more diverse and more energetic than ever before,” he said.

In perhaps their highest-profile triumph, Republicans finally defeated 15-term Rep. Collin Peterson from a rural Minnesota district that backed Trump in 2016 by 31 percentage points, Trump’s biggest margin in any Democratic-held district. Peterson, who chairs the House Agriculture Committee, is one of the House’s most conservative Democrats but was defeated by Republican Michelle Fischbach, the former lieutenant governor.

The latest Democratic incumbent to fall was freshman Rep. Abby Finkenauer of northeastern Iowa, who lost to GOP state Rep. Ashley Hinson.

The other defeated Democrats — all freshmen — included Reps. Debbie Mucarsel-Powell and Donna Shalala, health secretary under President Bill Clinton, in adjacent South Florida districts.

Joe Cunningham of South Carolina, Xochitl Torres Small of New Mexico and Kendra Horn in Oklahoma also lost. All had won surprising 2018 victories in districts Trump carried decisively in 2016.

The fight for Torres Small’s seat cost about $35 million, making it one of the country’s most expensive races, according to the nonpartisan Center for Responsive Politics. She was defeated by Yvette Herrell, a former state legislator.

Before votes were counted, both parties' operatives said the GOP would be fortunate to limit Democratic gains to modest single digits. Democrats control the House 232-197, with five open seats and one independent. It takes 218 seats to control the chamber.

Democrats were also disappointed in the Senate, where they nursed fading hopes of winning the majority.

A smaller Democratic majority would make it tougher for Pelosi to unite her lawmakers as a handful of progressive freshmen arrive for the new Congress.

By retaining House control, Democrats would mark only the second time in a quarter century that they’ve led the chamber for two consecutive two-year Congresses. The first period ran from 2007 through 2010, when Pelosi was serving her first four years as speaker.

“Our purpose in this race was to win so that we could protect the Affordable Care Act and so that we could crush the virus,” Pelosi told reporters, citing former President Barack Obama’s health care act. She declared Democrats had won the House majority, which seemed highly likely but hadn’t been officially determined by The Associated Press.

Democrats' hopes of protecting their majority and even expanding it were based on public anxiety over the pandemic, Trump’s alienation of suburban voters and a vast fundraising edge. But those advantages didn’t carry them as far as they’d hoped.

Democrats' setbacks were measured not just by seats they lost but by districts they failed to capture.

Democrats lost a majority Hispanic district in West Texas they expected to win after the GOP incumbent retired. And they lost a series of what seemed coin-flip races, failing to defeat GOP incumbents in Cincinnati, rural Illinois, central Virginia and the suburbs of St. Louis and several districts in Texas.

In a district between Austin and San Antonio, freshman GOP Rep. Chip Roy withstood a challenge from Democrat Wendy Davis. Davis gained fame as a state legislator by waging a 2013 filibuster against an anti-abortion bill, then lost a race for governor the following year. The conservative Club for Growth made her its biggest target, spending more than $6 million against her this year.

Democrats also notched no victories in long-shot races they’d hoped would bolster their majority. Republicans retained such seats in central North Carolina; Montana; Omaha, Nebraska; and around Little Rock, Arkansas.

Some endangered Democratic freshmen including Texas' Lizzie Fletcher, Georgia’s Lucy McBath and New Jersey’s Tom Malinowski and Andy Kim held on.

Democratic Rep. Alexandria Ocasio-Cortez of New York and the three other members of the so-called squad of young progressive women of color were easily reelected. A small handful of new progressives will be coming to Washington including Democrats Jamaal Bowman and Mondaire Jones of New York, but others such as Nebraska Democrat Kara Eastman lost their races.

Jones will be Congress' first openly gay black lawmaker, while another newcomer from New York, Democrat Ritchie Torres, will be its first openly gay Hispanic.

Marjorie Taylor Greene, who has espoused QAnon conspiracy theories, won a vacant seat in northwest Georgia. Trump has called Greene a “future Republican star.” QAnon asserts Trump is quietly waging a battle against pedophiles in government.

Republican Lauren Boebert, a guns rights activist and bar owner from western Colorado, won an open GOP seat there.

Hanging over the contests were the coronavirus pandemic and the wounded economy, which voters ranked as top concerns, according to AP VoteCast, a national survey of the electorate. The virus has killed more than 234,000 in the U.S. and cases are rising in nearly every state, while millions have lost jobs.

Democrats thought Trump’s repeated false statements downplaying the virus' severity would redouble the impact of their longtime focus on health care.

Buoying Democrats was a coast-to-coast edge in campaign fundraising. That allowed nearly all Democratic incumbents in potentially vulnerable districts to outspend their GOP challengers, often by vast margins, according to an AP analysis of Federal Election Commission campaign reports.

AP VoteCast is a nationwide survey of more than 127,000 voters and nonvoters conducted for The Associated Press by NORC at the University of Chicago.