The only sure thing in Montana's U.S. Senate race was that a Steve would be going to Washington.

Sen. Steve Daines, a Republican, narrowly defeated the state's popular two-term Democratic Gov. Steve Bullock in a highly competitive race that drew national attention. 

Daines, 58, beat out Bullock, 52.8% to 47.2%, according to The Associated Press. The race was key in Democrats' hopes to re-take control of the Senate. The contest broke records for a Montana campaign with $150 million spent by candidates and outside groups. 

Bullock announced his candidacy after a short-lived presidential bid in which he failed to stand out from a crowded field of Democrats. He initially said he would enter the Senate race before backpedaling.

The Senate race was one of the most competitive and expensive of the 2020 election cycle with Daines, at one point, leading by a percentage point in various polls ahead of Election Day.

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 20 points in 2016.

Republican candidate for U.S. Senate Sen. Steve Daines speaks at a campaign stop in Clancy, Mont. (Associated Press)

Republican candidate for U.S. Senate Sen. Steve Daines speaks at a campaign stop in Clancy, Mont. (Associated Press)

Daines, a California native, and Bullock clashed over the coronavirus response, gun ownership and the confirmation of Supreme Court Justice Amy Coney Barrett. 

CLICK HERE TO SEE FOX NEWS’ LIVE PROBABILITY DIALS

Bullock accused Daines of stalling on a second federal coronavirus relief package while saying he would not impose stricter measures to combat the virus because there was no federal safety net for business owners and workers.

The governor was praised for his swift COVID-19 response in the spring, which included a shutdown order that helped keep the virus at bay. But as the state reopened in early summer, the case tally began to climb. A record number of new cases, hospitalizations and deaths were reported in recent days, as the governor delegated responsibility for precautions to local authorities.

Bullock also rejected the confirmation process for Barrett, saying it put the Affordable Care Act in jeopardy. Daines survived attacks about his business ties to China and support for repealing the ACA. 

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. In July, Bullock successfully sued to remove the top official at the U.S. Bureau of Land Management.

CLICK HERE TO INTERACT WITH FOX NEWS VOTER ANALYSIS

Democratic U.S. Senate candidate Montana Gov. Steve Bullock speaks at the National Press Club in Washington in 2019. (Associated Press)

Democratic U.S. Senate candidate Montana Gov. Steve Bullock speaks at the National Press Club in Washington in 2019. (Associated Press)

A federal judge last month ruled that William Perry Pendley had unlawfully served for 424 days without being confirmed by the Senate. As of mid-October, Pendley still was working despite the ruling.

Trump has been largely absent from the race. In 2018, he hosted rallies in the state in a failed bid to oust Democratic Sen. Jon Tester.

Daines tied himself to Trump, backing his tax cuts and immigration policies while also defending him during his impeachment trial. Despite his support, Daines had to settle for an 8-1/2 minute “tele-rally” with the president in October — essentially a conference call for supporters and reporters in which no questions were taken.

CLICK HERE TO GET THE FOX NEWS APP

“Everybody put together does not equal Trump,” Jeremy Johnson, a political analyst at Carroll College in Helena, the state capital. “Trump’s the big draw. He’s the one who the press follows. ... He is prioritizing his election to the presidency over everybody else.”

In an effort to re-take the Senate, Democrats outspent Republicans in the race. Bullock's side spending $82 million and Daines' $63 million on television, radio and digital ads, according to data from the ad-tracking firm Kantar/CMAG.

The Associated Press contributed to this report.