Justice Anthony Kennedy’s pending retirement will give Donald Trump the chance to reshape the Supreme Court for a generation, but it also gives the president something much more immediate: a political weapon for the midterms. Trump wasted no time in using it. On Wednesday night, his first target was Sen. Heidi Heitkamp of North Dakota, one of the most vulnerable Democrat senators up for reelection this fall.

“Heidi will vote ‘no’ to any pick we make to the Supreme Court,” Trump told supporters at a rally in Fargo. “She’ll be forced to vote ‘no.’ Maybe because of this [the rally] she’ll be forced to vote ‘yes,’ but she will vote ‘no’ the day after the election, on everything.”

As I explained on Wednesday, the political fight over the Supreme Court may help Democrats nationally, but it’s likely to be a drag on their chances to retake the Senate this fall. That’s because control of the upper chamber will be decided in a handful of red states like North Dakota, which Trump won in a landslide two years ago and where he remains relatively popular today. Heitkamp and her fellow red-state Democrats have been trying to walk a political tightrope, highlighting areas of agreement with the president without embracing him so much that they turn off their base. That’s a near impossible task when the topic of the day—and every day between now and November—is the Supreme Court, and the very real possibility of overturning precedents like Roe v. Wade.

Heitkamp’s official response to Trump’s rally made no mention of the high court, nor the fact that she was one of three Democrats who voted to confirm Trump’s first pick, Neil Gorsuch, last year*:

Anytime the president comes to North Dakota, that’s a good thing for our state. While we saw election-year politics today, I’m always willing to work with the president if he’s helping North Dakota – and if he’s not, I’ll speak up. I don’t answer to a political party or president, I only answer to North Dakotans who deserve an independent voice in the Senate. That’s why I’ve always been eager to work across the aisle – including with the president – to get results for our state, and today’s rally hasn’t changed that.

Trump’s attacks were particularly noteworthy since he had previously made no secret of his affinity for Heitkamp. He floated her name for a possible Cabinet position during the transition, praised her onstage in North Dakota last year in front of a group of Republicans that included her opponent, Rep. Kevin Cramer, and invited her to the White House for a photo-op just last month. Before Wednesday, he’d arguably done more to help her, in a state he won by more than 35 percentage points two years ago. His embrace allowed Heitkamp to run ads hyping her own conservative streak and touting her willingness to work with the Republican in the White House.

That pitch will become a harder sell if the election becomes a hyperpartisan debate over the Supreme Court, including the future of a woman’s access to abortion. According to a survey from the Pew Research Center in 2014 (the last time the organization asked the question), 51 percent of North Dakotans said abortion should be illegal in all or most cases, making the state one of only 14 where at least half of respondents believed that. Also on that list are four other states that are likely to prove crucial to control of the Senate: Indiana, Missouri, and West Virginia, where Democratic incumbents are facing tough re-election battles, and Tennessee, one of only three states where Democrats have a clear shot at flipping a Senate seat.

*Correction, June 28: 2018: This post originally misspelled Neil Gorsuch’s last name.