As one of the most high-stakes years to date for this nation draws to a close, here's a look back at some of the most contentious races this election cycle.

The presidential election 

President Trump fought to the bitter end to overturn election results favoring President-elect Joe Biden. His legal team provided affidavits alleging mass voter fraud and violations in the counting process. They filed suit in every swing state and the president long asserted it was a "rigged" election. But after the Electoral College voted for Biden on Dec. 14, Trump's legal team largely ran out of options. 

Maine -- Susan Collins v. Sarah Gideon

Maine’s Sen. Susan Collins, the last Republican member of Congress from New England, pulled out a victory, though the odds were not in her favor.

Collins reasoned her win a testament to moderation.

"It’s a sign that my colleagues realize if we’re going to serve the American people, we need to come together," Collins said.

Maine’s House Speaker Sarah Gideon lost to the veteran incumbent by 70,237 votes on Election Day, or 50.99% to 42.41%.

Gideon had led in almost all polls leading up to the race -- FiveThirtyEight projected Gideon winning 59 to 41 percent. 

The election -- a referendum on Collins -- turned out to be the most expensive political campaign in state history.

Mainers largely have embraced Collins' call for pragmatism since sending her to the Senate in 1997, but Democrats banked on increased polarization and a disdain for President Trump in the northeastern region of the country.

Democrats’ pitching Collins as an enabler of Trump was not enough, though it successfully helped flip two other Senate seats. 

Collins became a top Democratic target when she voted to confirm Justice Brett Kavanaugh, but she refused to vote to confirm Justice Amy Coney Barrett, citing the confirmations’ proximity to the election.

Gideon, Collins’ progressive opponent, vastly outspent the longtime senator, garnering $69 million. She conceded the race with nearly $15 million still in her war chest. Collins raised around $29 million.

South Carolina -- Lindsey Graham v. Jaime Harrison 

Sen. Lindsey Graham fended off Democratic opponent Jaime Harrison, though the two were locked in a dead heat for South Carolina’s Senate seat for much of the election cycle.

Despite record-breaking fundraising hauls by his opponent, Graham managed to secure the seat Republicans have held for nearly two decades. 

Graham had faced some criticism, even among supporters in his own party, who slammed his shifting policies and loyalty to President Trump.

On top of that, Harrison stunned with a massive cash haul, raking in $107.6 million -- the highest of any Senate candidate in U.S. history -- while Graham raised $72.7 million.In three previous races -- in 2002, 2008 and 2014 -- Graham sailed to victory by double digits, and that didn’t change this time around-- 54.49% to 44.21%

Arizona -- Mark Kelly v. Martha McSally 

Republicans lost a Senate seat in Arizona, where incumbent Martha McSally lost to Democrat Mark Kelly in a special election. The contest was one of the costliest and most closely watched in the nation.

This will be the first time two Democrats have represented Arizona since the 1950s. 

Republican Gov. Doug Ducey had appointed McSally to the seat in 2018, after she narrowly lost a race to Democrat Kyrsten Sinema in the midterm elections. 

McSally is the first woman in U.S. history to fly a fighter jet in combat as well as the first to command a fighter squadron

Kelly, a former NASA astronaut, took the race with 51.17% of the vote to McSally’s 48.83%.

Pundits thought McSally’s close ties to Trump didn’t play well in Arizona’s moderate suburbs. 

Colorado -- John Hickenlooper v. Cory Gardner 

Republicans lost grip of another seat in Colorado, where Sen. Cory Gardner lost to Democratic former Gov. John Hickenlooper. 

Gardner, a Republican was a first-term senator running for reelection in a state expected to be swept by a so-called blue wave. Voters in the state seemingly turned away from the Republican Party under President Trump.

Gardner had successfully flipped the seat in 2014 defeating Democratic opponent then-Sen. Mark Udall.

Pollsters changed their analysis of Gardner’s race after he backed President Trump’s nomination of Amy Coney Barrett to the Supreme Court. His decision to back Barrett just one week before the general election likely led to his struggling poll numbers and ultimately his defeat by Hickenlooper.

Montana -- Steve Daines v. Steve Bullock 

In Montana, it was a battle of the Steves. Republican Sen. Steve Daines narrowly beat the state’s popular two-term Gov. Steve Bullock in one of the most expensive and competitive races of the 2020 election cycle. 

The contest broke records for a Montana campaign with $150 million spent by candidates and outside groups. 

Bullock, a Montana-born attorney from Helena, was hoping to use his popularity in a reliably conservative state to aid a Democratic push to re-take the Senate. President Trump won the state by about 16 points this election.  

Days before the election, the race was in a dead heat with no clear frontrunner. Polling showed Bullock and Daines switching back and forth for the top spot.

Bullock ran on his record of bipartisanship and portrayed himself as a fighter for public lands while casting his GOP opponent as a threat to the ACA.

Daines tied himself to Trump, backing his tax cuts and immigration policies while also defending him during his impeachment trial. 

North Carolina -- Thom Tillis v. Cal Cunningham 

In North Carolina, Republican Sen. Thom Tillis held on to his seat against Democrat Cal Cunningham. 

Tillis had 48.72% of the vote compared to Cunningham's 46.95%.

Tillis, 60, had the odds stacked against him — North Carolina voters are "brutal" to their incumbent senators, rejecting nearly all modern senators after just one term, elections policy analyst Andy Jackson told Fox News. 

Cunningham had done much better in the polls, pitching himself to moderate undecided voters. 

However, revelations that Cunningham, 47, engaged in an extramarital affair gave Tillis an October surprise advantage.

Cunningham, who is married, admitted to exchanging romantic texts with California woman Arlene Guzman Todd after the messages leaked. Guzman Todd later told The Associated Press that they had a physical affair.

The Georgia races 

In a rare occurrence Georgia had two Senate seats available this year, and both went to a runoff under Georgia's unusual election laws. No candidate in Georgia's November election earned a plurality of the votes. 

Sen. Kelly Loeffler is running against Rev. Raphael Warnock in a special election after she was appointed to her seat by Gov. Brian Kemp in 2018. Sen. David Perdue, a one-time incumbent, will face off against Democrat Jon Ossoff. The election is on Jan. 5.

CLICK HERE TO GET THE FOX NEWS APP

Perdue was ahead of Ossoff by nearly 80,000 votes in the general election. Warnock was ahead of Loeffler, but she shared votes with Republican frontrunner Rep. Doug Collins.

The races will determine the fate of the Senate's control-- if Democrats win both races, Sen. Kamala Harris will cast a tie-breaking vote and have a much easier time pushing through President-elect Joe Biden's agenda. If they lose one race, Republicans' narrow majority could rein in that agenda.