He'll appear with the Democratic candidate in Fargo. In his ad, Clinton touts Heitkamp's independence, and says she'll "fight for energy jobs" in oil, natural gas and coal.

"I've known Heidi for years back when she was one of the nicest, and toughest, attorney generals in the country," he says in the ad.

The ad is an effort to highlight Heitkamp's independence, as she's running an a state that leans red and where a large portion of voters will need to split their ticket to back her.

To convince those voters, Heitkamp has framed herself as a candidate unafraid to buck her party on issues like the Keystone pipeline and oil and natural-gas drilling, and has also made a plea based on personal likability.

Most public polls of the race have given Rep. Rick Berg (R-N.D.) a lead on Heitkamp, but Democrats say the race is closer than that in their internal polling, though internal polls tend to be skewed. The Hill rates the race as a toss-up.