Senator Susan Collins of Maine is re-elected, further dimming Democratic hopes of Senate control.

Senator Susan Collins, Republican of Maine, emerged victorious on Wednesday in her bid to secure a fifth term, beating back an avalanche of Democratic money and liberal anger in the most difficult race of her career to defeat Sara Gideon, a Democrat, and strengthen her party’s hold on the Senate.

The Associated Press called the race for Ms. Collins with an estimated 75 percent of the votes tabulated and Ms. Collins leading Ms. Gideon by more than six percentage points, 49.8 percent to 43.4 percent.

Ms. Collins said she had received “a very gracious call” from Ms. Gideon conceding the race.

Ms. Collins’s victory dashed Democratic hopes of a crucial pickup as their ambitions of a Senate takeover hung by a thread.

If Joseph R. Biden Jr. wins the presidency, Democrats need to gain three seats to retake control of the Senate, which the Republicans have held since 2015. If President Trump is re-elected, Democrats need to gain four seats.

So far, Democrats have flipped two seats and Republicans have flipped one, for a net gain to the Democrats of one seat. Three races for Republican-held seats where Democrats were thought to have a chance have yet to be called, and Republicans held an edge in two of them.

The Collins-Gideon race was the most expensive in Maine history, with national donors flooding the state with tens of millions of dollars and an onslaught of negative campaign ads. The battle for control of the Senate appeared to be heading out of reach for Democrats.

Democrats early Wednesday won a crucial seat in Arizona, with Mark Kelly, a former astronaut, defeating Senator Martha McSally, and former Gov. John Hickenlooper defeated Senator Cory Gardner on Tuesday night in the high-profile fight for Colorado’s Senate seat. Those victories were essential to Democrats’ push to take the Senate majority.

In Georgia, the Rev. Dr. Raphael G. Warnock, a Democrat, advanced to a runoff election against Senator Kelly Loeffler, the Republican incumbent. The other race in the state, between Jon Ossoff, the Democratic challenger, and Senator David Perdue, a Republican, was too close to call.

But Republicans across the country were successful in holding off well-funded challengers in a number of key races. In Montana, Senator Steve Daines defeated Gov. Steve Bullock and in Iowa, Senator Joni Ernst defeated Theresa Greenfield, a businesswoman who had styled herself as a “scrappy farm kid.” Senator Lindsey Graham, a Republican, hung onto his seat in South Carolina, fending off the toughest challenge of his political career from Jaime Harrison, a Black Democrat whose upstart campaign electrified progressives across the country and inspired a record-setting onslaught of campaign cash.

Senator John Cornyn, Republican of Texas, also defeated a challenge from M.J. Hegar, a former Air Force pilot who Democrats hoped could have an outside chance of winning in the rapidly changing state. In Kentucky, Senator Mitch McConnell, the majority leader, easily won re-election, defeating Amy McGrath, a Democrat who struggled to gain ground despite an outpouring of financial support from her party’s supporters around the nation.

Republicans succeeded in ousting Senator Doug Jones, Democrat of Alabama, who came to power in a 2017 special election against Roy S. Moore, who was accused of sexually assaulting and pursuing teenage girls.

Democrats were in danger of losing another seat in Michigan, where the Democratic incumbent, Gary Peters, was in a neck-and-neck race with his Republican challenger, John James.

Senator Thom Tillis, Republican of North Carolina, claimed victory Wednesday afternoon over his Democratic challenger, Cal Cunningham, in a seat that strategists in both parties identified as a possible tipping point, but news organizations did not declare a victor and Mr. Cunningham did not concede.