This is not a story you'd expect to read in 2017, but it happened: President Trump went to North Dakota on Wednesday and praised its Democratic senator, who is up for reelection next year, as a “good woman."

"Come on up, senator," Trump told a crowd at an oil refinery in Mandan, as he had a called up some of the state's elected officials, all of them Republican, save Sen. Heidi Heitkamp. "These are great people. They work hard. They’re for you 100 percent."

He went on: "And we just want their support, because we need support. You see that with what’s happening in Congress. Nobody can get anything through Congress. We need support, so thank you, senator. Senator Heitkamp. Everyone’s saying: What’s she doing up here? But I’ll tell you what: Good woman, and I think we’ll have your support — I hope we’ll have your support. And thank you very much, senator. Thank you for coming up.”

The president of the United States may not be popular with Americans at large, but he certainly has some sway in this state. And Trump just gave Heitkamp a potentially massive boost as she tries to remain the state's lone statewide elected Democrat.

Heitkamp is up for reelection in November 2018, and she'll be one of the most endangered Democratic senators on the ballot next year just by virtue of the political makeup of the state she's running for reelection in.

North Dakota voted for Trump over Hillary Clinton in November by 36 percentage points. Just two of North Dakota's 53 counties voted Democrat in the presidential election. Sen. John Hoeven (R-N.D.), who was up for reelection alongside Trump, beat his Democratic opponent by more than 61 points.

Here's how deep North Dakota's redness goes: Of North Dakota's 141 state legislative seats, Democrats hold 22.

Heitkamp is the only Democrat to hold statewide office there. And Trump just shook her hand on stage, in front of voters she'll probably need to get reelected, saying things she'll probably play over and over again to get reelected.

As The Washington Post's Philip Rucker and Jenna Johnson wrote: "A year from now, North Dakotans may be hearing these two words a lot: 'Good woman.' "

Perhaps most agonizing for Republicans: On stage with Trump and Heitkamp was her potential challenger, Rep. Kevin Cramer (R-N.D.). Sure, Trump called everyone on stage "great people." But he exclusively singled out Heitkamp for her greatness.

(The only declared candidate right now is Tom Campbell, a farmer and Republican state senator, who got into the race in August.)

Confounding Republicans' frustrations: Trump also did this hours after siding with Democrats in a debt-ceiling and budget fight.

This isn't the first time Trump has called out Senate Democrats up for reelection in 2018 while on an official White House event. But it's definitely the first time he's praised one of them. Last week, he went to Missouri to pitch tax reform and urged voters to vote Sen. Claire McCaskill (D-Mo.) out of office if she didn't vote for Republicans' tax reform bill.

President Trump said that if Sen. Claire McCaskill (D-Mo.) doesn't lower taxes, "you have to vote her out of office," in Springfield, Mo., on Aug. 30. (The Washington Post)

His shout-out to Heitkamp doesn't come totally out of the blue. Heitkamp and Trump have something of an odd-couple pairing going on. Heitkamp traveled on Air Force One with Trump from Washington for the event, along with the rest of the congressional delegation.

And after Trump got elected, Heitkamp sure sounded as though she was open to serving in the Trump administration.  She met with Trump at Trump Tower in New York during the transition, issuing this tantalizingly vague statement: "Whatever job I do, I hope to work with the president-elect and all of my colleagues in Congress."

As I wrote then, it'd kinda make sense if Heitkamp decided to jump ship:

Her reelection to a second term in 2018 is an uphill battle with no guarantees. The 2018 midterms are shaping up to be the story of endangered, red-state Democrats trying desperately to hold their seats, and Heitkamp is arguably the most endangered of this group. She scraped out a win in 2012, and Trump won the state with 63 percent of the vote — one of his largest margins of victory anywhere.

A job with Trump didn't pan out. Instead, she got a handshake and a "good woman" from the president on the most valuable of stages, making her potentially tough reelection potentially a lot easier.