WASHINGTON — President Donald Trump is endorsing candidates, rallying his supporters and this week will again test his ability to move Republican votes when his name is not on the ballot.

On Tuesday, two very different parts of Trump’s base will decide whether to back the president’s chosen candidates, an early indicator of Trump’s ability to turn out his supporters out for the fall midterm elections.

In New York, Trump has endorsed Rep. Dan Donovan in his tight Staten Island-area race against former Rep. Michael Grimm. Grimm was briefly jailed for felony tax fraud but retains a base of support in the more blue-collar district, where Trump is also embraced as a native son.

And in deeply conservative, heavily evangelical South Carolina, where voters appreciate Trump’s Supreme Court choice, Trump will rally today for Gov. Henry McMaster, who is in a competitive primary runoff against businessman John Warren.

In past elections this year, Trump’s word hasn’t always mattered much, with several of his anointed candidates losing high-profile races — including Luther Strange in an Alabama Senate primary, and Rick Saccone in a Pennsylvania congressional district where Trump won by about 20 percentage points in the 2016 election.

The results Tuesday will help political operatives gauge how effectively Trump can transfer the energy of his base to other candidates, now that the midterms are less than five months away.

Trump’s ability to bestow his brand on other Republicans has serious implications for this fall’s elections, as GOP contenders confront what many see as a lack of enthusiasm among right-of-center voters because Trump is not on the ballot and the Republican-controlled Congress hasn’t achieved many of its priorities.

On the other side, Democrats are providing significant evidence of an activist base mobilized against Trump.

At a minimum, Republican strategists and activists in New York and South Carolina say that when it comes to stoking energy, a Trump endorsement can only help, even if it’s not a guarantee of victory.

A poll this month from NY1/Siena College –– the timing of which didn’t fully capture any Trump endorsement bounce –– found Grimm leading Donovan by 10 percentage points, and Grimm has devoted fans who have circled the wagons around him. National Republicans continue to see the race as extremely competitive, with an unpredictable primary electorate.

But pro-Donovan forces say Trump’s endorsement –– and support from his presidential campaign, including a video from daughter-in-law Lara Trump, a senior campaign adviser –– injected a new sense of energy and confidence into the congressman’s campaign, while also helping to blunt Grimm’s accusations that Donovan is an establishment Republican who doesn’t stand with Trump.

“Donald Trump is loved on Staten Island, and, particularly in a Republican primary, it could make or break the race, and I think it has given Danny the momentum he needs to win,” said Republican state Assemblywoman Nicole Malliotakis, whose district is in the Donovan congressional district. “It has the ability to neutralize Grimm voters and push undecided toward Donovan. In a race where the polls show it being tight, that makes the difference.”

In a Republican primary in socially conservative South Carolina, there is no greater gift than a Trump endorsement.

Trump endorsed McMaster well before the primary. But last week the president detailed his home-stretch runoff plans for the governor: “I will be going the Columbia, South Carolina, on Monday night to do a campaign speech for one of my very early supporters, a man who truly loves the people of South Carolina, Governor Henry McMaster,” he said on Twitter. “Henry worked so hard & was so loyal to me that I look forward to reciprocating!”

Trump goes to South Carolina emboldened. Two weeks earlier, he intervened on Katie Arrington’s behalf in her quest to beat incumbent Republican Rep. Mark Sanford in the 1st Congressional District’s primary. Arrington prevailed, and Trump is taking credit for helping make it happen.

But despite the narrative that Sanford lost because Trump backed his opponent, several Republican political officeholders, strategists and observers in the state said Trump’s endorsement was only part of the equation.

They say Sanford, who had never before lost an election, didn’t take Arrington’s challenge seriously until it was too late. Sanford also narrowly won his primary two years ago, which should have been a sign that he was weaker among constituents than he appeared. (In an interview, Sanford disputed characterizations that he didn’t take Arrington seriously, and said Trump was the definitive factor in his defeat.)

If Trump didn’t single-handedly deliver Arrington the election, it’s unclear whether he can significantly tip the scales for McMaster, who always treated his primary race as competitive. Trump’s endorsement wasn’t enough to help McMaster win more than 50 percent of the vote in a crowded primary field, forcing the governor to compete in a runoff.

“The Donald Trump effect is not transferable,” said Matt Moore, a political consultant and former South Carolina Republican Party chairman. “He is a once-in-a-lifetime political phenomenon and we are seeing that in the governor’s race in South Carolina. Henry McMaster has done almost everything but literally hugged Donald Trump and he couldn’t get over 50 percent in the primary.”

In other significant races in which Trump has campaigned, Trump’s candidates lost.