In Indianapolis last fall, President Trump pledged to campaign against the state’s Democratic Sen. Joe Donnelly “like you wouldn’t believe” if he voted against the Republican tax plan.

With Donnelly’s “no” vote now firmly on the books, Trump is headed back to Indiana on Thursday at a time when the campaigner in chief has escalated his attacks on red-state Senate Democrats — but also at a time when the White House needs their votes the most.

That dynamic is particularly clear with the controversial nomination of Gina Haspel to lead the Central Intelligence Agency; Haspel had her confirmation hearing Wednesday and almost will certainly need some Democratic help to get across the finish line. Donnelly is one of the ripest targets for a pro-Haspel vote among Democrats, but he is almost certain to get pummeled by Trump when the president visits his home state Thursday. 

“I don’t worry about that,” Donnelly said of the political threats from the administration. “When the president is right, I’ll be with him every time. But when he’s not, I’ll pass.”

The White House’s approach to Donnelly illustrates the balancing act it faces when it comes to red-state Democrats: How hard do you attack a vulnerable senator ahead of the midterm elections when you may need their vote to advance key parts of Trump’s agenda, particularly on confirming picks for cabinet posts? 

The White House has made clear it doesn’t see much use in going easy on moderate Democrats. In an interview last week with WIBC, a radio station in Indianapolis, spokesman Raj Shah said “part of the planning” for the White House’s midterm strategy includes Trump visiting key battleground states with senators who’ve been part of what the administration calls the historic obstruction of Trump’s nominees.

“We’re hoping that Senator Donnelly doesn’t participate in that effort,” Shah said during the May 2 interview. “Yeah, the president may have something to say about it.”

Donnelly is far from the only red-state Democrat to face Trump’s wrath in recent weeks.

Sen. Jon Tester (Mont.), who played a central role in sinking the nomination of Ronny L. Jackson to lead the Department of Veterans Affairs, has probably endured the brunt of the recent attacks, particularly on Twitter. But in his role as the top Democrat on the Senate Veterans’ Affairs Committee, the second-term Montana senator will be key to whether the next VA secretary nominee will pick up bipartisan support. 

In Cleveland on Saturday, Trump went after Sen. Sherrod Brown (D-Ohio) by tying him to “weak” immigration laws at an event billed as an official tax roundtable. At the National Rifle Association annual meeting in Dallas last week, Trump called out Sens. Bill Nelson (D-Fla.) and Robert P. Casey Jr. (D-Pa.) for opposing crackdowns on “sanctuary cities,” where local officials decline to cooperate with federal immigration authorities. 

At another tax roundtable in early April, Trump repeatedly jabbed at Sen. Joe Manchin III (W.Va.), who has been one of his staunchest Democratic allies in the Senate but has gotten little love from the president in return. 

“The Democrats have a problem. I mean, if you look at your senator, he voted against — Joe — he voted against,” Trump said at an event in White Sulphur Springs, W.Va., a state he won by more than 40 percentage points in 2016. “No, it was bad. I thought he would be helpful because he talks. Grabs me; I grab him. Says hello; I say hello. But he votes against everything.”

Manchin like most of his moderate colleagues has avoided getting into a war of words with Trump, instead casting themselves as willing to support him when they agree with his policies or nominees.

When asked Wednesday about Trump’s comments last month, Manchin chose to deflect and lament the state of “toxic” politics.

“If you’re on the ‘D’ side, you want to attack every Republican; you’re on the ‘R’ side, you want to attack Democrats. I don’t do that,” Manchin said. “I don’t subscribe to it, not going to subscribe to it. He’s got to do whatever he thinks he needs to do.”

While targeting the Democrats who are the most vital to Trump’s agenda could be counterproductive, there seems to have been little downside so far. Manchin announced Wednesday that he would support Haspel to lead the nation’s spy agency. 

Even if Sen. Rand Paul (R-Ky.) remains opposed to Haspel, Manchin’s announcement Wednesday means she will have enough votes to get confirmed as long as no other Senate Republicans defect. Donnelly, who backed other key Trump picks such as Secretary of State Mike Pompeo and Supreme Court Justice Neil M. Gorsuch, is also still in play for Haspel’s confirmation. 

The willingness of centrists such as Donnelly and Manchin to support Trump have frustrated their party’s base, who say that no amount of votes for Trump’s agenda will insulate vulnerable Democrats from being targeted by the White House during the midterm campaign season. 

“Moderate Democrats voting with Trump and the GOP — to promote torture, deregulate Wall Street and spread hate — are picking the wrong side,” said Angel Padilla, policy director for the liberal group Indivisible. “They are misreading the moment we’re in as a nation.”

But the red-state Democratic senators are banking on the idea that voters will be impressed that they are willing to work with the administration and are highlighting their efforts to do so.

Donnelly met privately with Vice President Pence for 45 minutes at the Capitol last month, pitching him on “right-to-try” legislation he has written with Sen. Ron Johnson (R-Wis.) that would ease access for the critically ill to experimental treatments. The two men also chatted about their families, the christening of the USS Indianapolis and foreign policy issues such as North Korea and Syria. 

That meeting is one of several Donnelly has held with Trump, Pence or other top administration officials, including an Air Force One ride with the president to the Indianapolis tax speech last September. So when the administration prepares a political assault on Democrats such as him, Donnelly shrugs it off. 

“It doesn’t even cross my mind,” Donnelly said. “I view each nominee on their qualifications, get the chance to talk to them about what their plans and their vision for their agency might be . . . and then make a call. If I think they’ll be good for the country, I’ll vote for them.”