North Dakota Rep. Kevin Cramer (R-N.D.) (shown above left) was able to defeat incumbent Sen. Heidi Heitkamp (D-N.D.) (above right) on Tuesday night weeks after gaining a sharp lead in most polls.

Heitkamp was hoping to win a second term after first gaining the seat in 2012.

She ran a competitive campaign in the overwhelmingly red state, but started to fall behind in the polls as the contest entered the final month.

Cramer pulled ahead and was able to maintain that lead up until winning on Election Day.

Fox News called the race at 60.1 percent to 39.9 percent in his favor, with 23 percent of the vote in shortly after 10 p.m.

Cramer has served as a representative for the only congressional district in the state since 2013. His campaign has focused on issues such as tax cuts, economic growth, illegal immigration and national security.

He voted in favor of the Tax Cuts and Jobs Act 0f 2017. President Donald Trump has focused on similar issues as part of his platform.

Related: Cramer Questions Heitkamp’s Intelligence During Final Debate

Trump has drawn the attention of both candidates, having won the state by 63 percent in the presidential election of 2016. Cramer has mirrored the president on issues like illegal immigration and defunding sanctuary cities as well.

Heitkamp has highlighted her willingness to work with the president.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

She positioned herself as a more moderate politician, even admitting the Affordable Care Act has problems, which she has worked to fix by introducing legislation. She also helped garner support for the Keystone XL Pipeline. She even shares some common views with Trump, including an approach to border security. The evenhanded approach seemed to work at first.

North Dakota attracted attention early on with the chance the seat could flip. CNN had listed the race among its top 10 seats that were the most likely to flip in 2018. RealClearPolitics rated the race a toss-up up until the final month — when the divide began to form. Cramer was able to pull ahead with an 11.4 point lead by the end.

The nomination and confirmation of Justice Brett Kavanaugh — whom Trump chose back in July for the Supreme Court — likely played a major role in how the race eventually turned out.

He was able to overcome a highly contentious confirmation process before being sworn in October 6. Heitkamp started to slip in the polls following her decision to vote against the Kavanaugh nomination.

Related: Border Patrol Union That Endorsed Trump Now Backs Heitkamp

Senate Democrats had called for delaying or revoking the Kavanaugh nomination for various reasons ever since he was picked by the president. His confirmation hearing devolved into a shouting match — and protests were frequent. The process was eventually overshadowed when he was hit with sexual assault allegations.

North Dakota voters were evenly split between the two candidates up until Heitkamp cast that vote against Kavanaugh. Heitkamp also had to deal with a controversy shortly after her no vote. Her campaign released newspapers ads that identified domestic violence, sexual abuse and rape victims — without their consent. She apologized for the mistake.

Cramer won the race despite falling behind in fundraising at only $5,531,588. Most of those funds came from large individual contributions at 54 percent. Heitkamp was able to raise a lot more despite losing the race at $27,017,315.

She also got most of her campaign funds from large individual contributions at 47 percent.

The midterms overall have drawn a considerable amount of attention, indicative of the political unrest across the country. Trump’s win of the presidential election in 2016 was seen by many as a rebuke of elitist dogma that hurt everyday people. But critics saw the midterms as a way to challenge the president and what they perceive as a racist and hateful agenda.

The Center for Responsive Politics released a report last week projecting that the current midterm elections will be the most expensive ever at more than $5.2 billion. Every prior election didn’t even surpass $4.2 billion in spending when adjusted for inflation. The overall estimated cost would represent a 35 percent increase from 2014.

Trump has been fully invested in the midterms, as the results of the election potentially put his agenda at risk. He has held dozens of rallies across the country in recent months to stir support for conservative candidates. Those efforts ramped up in the final week, as the president traveled to state after state for 11 different rallies.

Check out this video: