Rep. Kevin Cramer, R-N.D., is interviewed at Boneshaker Coffee in Bismarck, N.D., on August 17, 2018.

Cramer has staunchly supported a trade war against China and the European Union, among other powers, despite his constituency largely consisting of farmers who have been impacted by tariffs and trade barriers.

Cramer, a two-term North Dakota congressman, dedicated most of his campaign to showing voters he will be a faithful Trump supporter if he were to be elected to the Senate.

President Donald Trump won North Dakota by more than 35 points in the 2016 presidential election, and the 2018 Senate contest became a pivotal race for both major parties. Nonpartisan political analysis site Larry Sabato's Crystal Ball labeled the state "leans Republican" in the run-up to Election Day.

Republican Rep. Kevin Cramer will unseat North Dakota Democratic Sen. Heidi Heitkamp in one of most closely watched races this fall, NBC News projects.

In an interview in July with KVRR, a television station in North Dakota, Cramer said he believed the only way to get through a trade war is to win.

"Some people are saying we need to get out of this trade war. There's only one thing to do in a trade war and that is win it," Cramer said at the time, according to KVRR's transcript of the interview.

Heitkamp, a one-term incumbent, tried to appeal to the growing Trump voter contingent in the state, and consistently said she is willing to work with the president when it best suits her constituency.

"I'm going to support him [Trump] when he's right, and I'm going to oppose when he's hurting the state," Heitkamp said in a recent interview with CNBC.

She voted to confirm Trump's first Supreme Court nominee, Justice Neil Gorsuch, but voted no on Justice Brett Kavanaugh's nomination after he was accused of sexual assault. Kavanaugh has denied the allegations.

Her Kavanaugh decision appeared to be a turning point in the race as polls moved away from Heitkamp in the days after her announcement. She still found a way to raise $12.5 million throughout October, just days after she voted to oppose Kavanaugh.

The Senate Leadership Fund, a super PAC aligned with Republican Senate Majority Leader Mitch McConnell, spent just more than $3 million against Heitkamp.

The senator, however, had her own fundraising juggernaut. She outraised Cramer throughout the entirety of the election, finishing the cycle raising $27 million compared with Cramer's $5 million.