Democrats are projected to keep control of the House after Tuesday’s elections, but Republicans appeared to have fended off a blue wave in the Senate and can still retain a majority in the upper chamber.

House Speaker Nancy Pelosi was expected to keep her majority in the House, but Democratic incumbents suffered losses in Florida, South Carolina, Minnesota and elsewhere.

“I’m very, very proud of the fact that tonight — relatively early — we are able to say that we have held the House,” Pelosi announced shortly after 11 p.m. ET during a news conference.

House GOP Leader Kevin McCarthy said the erosion of the Democratic majority may spell trouble for Pelosi getting enough votes to be reelected speaker and predicted she’ll have trouble getting her agenda passed.

“I know the vote on the floor is difficult for Speaker. I know there was a number of people who did not vote for her last time,” McCarthy said Wednesday, alluding to Democratic defectors two years ago. “And as our numbers continue to grow, I think at the end of the day, no matter where we end up, we’ll be able to have a very big say, or even run the floor when it comes to policy.”

Senate control has been more of a nailbiter from late Tuesday night into Wednesday morning. Democrats needed a net gain of three seats and Joe Biden as president to win back the majority — or four seats if President Trump was reelected.

As of 2 a.m. ET Wednesday, Democrats had a net gain of one Senate seat and they failed in their efforts to flip Iowa, South Carolina, Kansas, Texas and Montana, Fox News projected.

The majority will come down to a few critical races in Maine, North Carolina, Michigan and Georgia as Republicans continue to shut down pathways for Democrats to pick up seats.

Democrats’ victories came by flipping Arizona and Colorado from red to blue, Fox News projected. The Colorado race, in which Democratic former Gov. John Hickenlooper ousted Republican incumbent Sen. Cory Gardner, was the first Senate seat to flip Tuesday night.

“More Coloradans have voted in this election than in any election in our state’s history,” Hickenlooper said in a victory speech thanking Coloradans and touting the turnout.

“Clearly, people are saying it’s time to turn the page,” he added.

Shortly after 11 p.m. ET, Fox News projected that Democrat Mark Kelly, a former NASA astronaut, would defeat Sen. Martha McSally, who was appointed to the seat in 2019 to replace the late Sen. John McCain in Arizona.

But McSally refused to concede.

“With one million votes to be counted and no Election Day results reported from Maricopa County, the decision to make a call at this point is irresponsible,” McSally spokeswoman Caroline Anderegg said in a statement. “We will continue to wait for votes to come in. This race is not over.”

Republicans’ big flip came in Alabama. Fox News projected that Tommy Tuberville, the former college football coach backed by Trump, would beat Democrat Sen. Doug Jones in the deep-red state. Jones, the most vulnerable Democrat in the Senate, won a special election in 2017 beating Republican Roy Moore, who faced allegations of sexual misconduct with teenaged girls.

In more good news for Republicans, Texas GOP Sen. John Cornyn defeated Democrat MJ Hegar, a motorcycle-riding Air Force veteran — dashing Democrats’ dream of flipping the Lone Star state. Iowa Sen. Joni Ernst beat Democrat Theresa Greenfield, Fox News projected, closing off another avenue for blue gains.

And in another blow for Democrats, Fox News Decision Desk projected shortly after 2 a.m. that Montana Sen. Steve Daines will win reelection by defeating Democratic Gov. Steve Bullock, a significant setback to Democrats in their efforts to take control of the Senate.

Fox News also projected that Sen. Lindsey Graham, R-S.C., fended off a serious scare from Democrat Jaime Harrison, who raised a record-breaking $107.6 million to challenge the powerful Judiciary Committee chairman. Graham got a boost with his GOP base in the final weeks of the campaign by presiding over the successful confirmation of Supreme Court Justice Amy Coney Barrett.

“Aren’t you glad that this election is coming to an end?” Graham asked at his victory party. Graham said he already talked to Trump on the phone and predicted the president would be reelected, too.

“To all the pollsters out there, you have no idea what you are doing. And to all the liberals in California in New York, you wasted a lot of money,” Graham said, of record spending on his race.

Republicans were fighting to hold a slim 53-47 majority in the Senate.

There’s still a pick-up opportunity for the GOP in Michigan, where Democratic Sen. Gary Peters was facing a serious challenge from Iraq veteran John James.

Democrats were trying to go on offense in traditionally red states, buoyed by record fundraising and a message of defending healthcare in the midst of the coronavirus pandemic. But as Election Day crept into Wednesday, it was clear Republicans had held the line in several battleground states, and Democrats’ pick-up opportunities were diminishing.

Outstanding races where Democrats still have openings are Maine, North Carolina, and two seats in Georgia. At least one of the Georgia races was headed to a run-off in January between Sen. Kelly Loeffler, R-Ga., and Democrat Raphael Warnock, pastor at Ebenezer Baptist Church.

Senate Majority Leader Mitch McConnell, R-Ky., long-predicted that control of Senate would be a “50-50 proposition” with so many Republicans playing defense this election. Twelve GOP incumbents had competitive races, but only two Democrats were in jeopardy.

McConnell got good news early in the night by winning reelection in his home state of Kentucky, staving off a challenge from Democrat Amy McGrath.

The Senate leader headed into Election Day with a big win for Republicans by confirming the third of Trump’s Supreme Court nominees under highly contentious circumstances.

McConnell on Tuesday night thanked Kentuckians for sending him back to Washington and cast his reelection as a win for working people in America’s heartland.

“I’m the only one of the four congressional leaders not from New York or California,” McConnell said in a victory speech alongside his wife, Transportation Secretary Elaine Chao. “I look out for middle America.”

Heading into Election Day, top election forecasters had agreed that Democrats would retain the House and had a good shot of picking up the Senate, as well. But as results continued to come in Wednesday, they undercut any hope of a blue wave in Congress.

“Last night and this morning’s results should serve as a wake-up call that the prognosticators have no clue what they are talking about,” said Michael McAdams, spokesman for the National Republican Campaign Committee (NRCC). “Chairman [Tom] Emmer kept the NRCC laser-focused on our game plan and our massive success reflects that reality.”

The Cook Political Report projected Democrats would win between two and seven seats in the Senate. If it’s only two, Republicans still are in control. Inside Elections, another nonpartisan election analysis outlet, gave a rosier outlook for Democrats, with a net gain of four to six seats — enough to win the majority. And FiveThirtyEight’s election forecasts also found Democrats were favored to win the majority with a 77 in 100 shot.

In the House, the Cook Political Report projected Democrats will have a net gain of between five and 15 seats after the election. Inside Elections projected an even better pickup for Democrats, of 14 to 20 seats. And FiveThirtyEight said Democrats have a 98 in 100 chance of retaining the House majority.

Earlier Tuesday, Pelosi, D-Calif., was optimistic Democrats would hold the majority and expand their gains from 2018 by going on offense in many congressional seats that Trump carried four years ago.

“We’re going to increase our numbers tonight and make the future better for our children,” Pelosi said before the results were in.

She spoke at a news conference with Rep. Cheri Bustos, head of the Democratic Congressional Campaign Committee.

“We’re playing deep into Trump districts,” Bustos added.

But Democrats ended up suffering several losses in swing districts, and their main efforts to flip red seats in Trump country were coming up short.

Heading into the election, Democrats had a 233-201 majority (including five vacant seats) and there’s one Libertarian member, outgoing Rep. Justin Amash, whose seat in West Michigan was up for grabs.

Republicans would have needed a net gain of 17 seats to win back the majority in the House. While they have fallen short of the goal, the NRCC is projecting Republicans will pick up seats and their numbers could reach between 208-212, depending on the results of the final races being counted.

They already found success in Florida where Republicans ousted two Democratic lawmakers.

Florida Republican candidate Carlos Gimenez defeated freshman Democratic Rep. Debbie Mucarsel-Powell — the first flip of a House seat Tuesday night.

And then Republican Maria Elvira Salazar defeated freshman Democratic Rep. Donna Shalala.

Democrats picked up two open GOP seats in North Carolina that tilted blue after new congressional district maps.

Then, Republican Michelle Fischbach ousted longtime Democratic Rep. Collin Peterson in Minnesota, toppling the powerful chairman of the House Agriculture Committee in the most pro-Trump district held by a Democrat. In New Mexico, Republican Yvette Herrell defeated freshman Rep. Xochitl Torres Small, a freshman Democrat who flipped a seat from red to blue in 2018.

Republican Stephanie Bice unseated freshman Democratic Rep. Kendra Horn in Oklahoma. Horn flipped the seat from red to blue last cycle. Freshman congressman Democrat Joe Cunningham lost his reelection to state GOP Rep. Nancy Mace, flipping South Carolina’s 1st District back to red.

Democrat Kara Eastman, backed by Rep. Alexandria Ocasio-Cortez of New York, failed to defeat Rep. Don Bacon, R-Neb., in Omaha, even though the electoral vote from that district is slated to go to Biden.

Cameron Webb, a lawyer and doctor treating coronavirus patients, didn’t flip Virginia’s 5th District where outgoing Rep. Denver Riggleman lost to GOP primary challenger Bob Good after he officiated a same-sex wedding. Good, a born-again Christian and a former athletic official at Liberty University, defeated Webb Tuesday, Fox News has called.

Other Republican incumbents facing very tough reelection fights came out victorious Tuesday, including Rep. Ann Wagner of Missouri and Rep. Rodney Davis in Illinois.

Rep. Steve Chabot in Ohio won his reelection against a tough challenge from Democrat Kate Schroder. And Republican Rep. Chip Roy also earned another term in Congress after defeating former Democratic state Sen. Wendy Davis in Texas’s 21st Congressional District.

There was a bright spot for Democrats Tuesday night in Arizona — one of their biggest targets. Fox News projected Biden won the state and Democrats flipped the Senate seat there.

Mark Kelly, the retired astronaut and husband of former Rep. Gabby Giffords, offered a message of unity in the final hours of voting in Arizona.

“If you’re looking for somebody who’s willing to work across the aisle, who is tired of the partisanship and the polarization, the choice is pretty clear,” Kelly told Fox News before the race was called. He commended efforts by the late Sen. John McCain, R-Ariz., to reach across the aisle and said he’d bring a spirit of independence and problem-solving to Washington.

Meanwhile, McSally had brushed off polling that suggested she was losing and said enthusiasm and momentum were on her side.

“We are a battleground state,” McSally told Fox News Monday night. “We’re ground zero to decide the direction of our country. And I’m confident Arizonans are going to choose freedom.”