Though President Trump seems to be vilified daily, he still has substantial electoral political influence. In at least two U.S. Senate races, for example, support for and from the nation’s 45th president could well determine who wins the Republican nomination in two states, and perhaps the general election.

Alabamians are deciding who will replace Attorney General Jeff Sessions in the Senate. Sessions resigned earlier this year to accept Trump’s federal appointment.

Former Alabama Attorney General Luther Strange is serving in the Senate on an interim basis, after being controversially appointed by then-Gov. Robert Bentley once Sessions departed for the Justice Department. Just weeks after tabbing Strange, Gov. Bentley, a Republican, was forced to resign as part of a plea-bargain agreement relating to campaign finance violations.

The state legislature’s House and Senate leaders were moving toward impeaching Bentley, but held back on the advice of then-Attorney General Strange who indicated a state investigation was underway. Several weeks later, Bentley then appointed Strange to the Senate, who publicly sought the job. Bentley’s added benefit was to then choose Strange’s replacement, who would subsequently assume responsibility for the governor’s investigation.

After Bentley’s resignation, new Gov. Kay Ivey, a Republican, scheduled the special election to fill the Senate seat on a permanent basis. The final vote is December 12, and the winner serves the balance of the current term through the end of 2020.

In late September, former Alabama state Supreme Court Chief Justice Roy Moore and Strange, the two Republicans who advanced to the run-off election from a field of nine primary candidates, will square off to determine who will win the Republican nomination.

Trump rather surprisingly endorsed Strange before the first vote, even though Moore vociferously advocated for the president. It is probable Trump will do no more than perhaps reiterate his support for Strange during the run-off campaign. Yet, even in a run-off election in which the president will likely say and do little, he could conceivably become the determining factor.

Arizona Sen. Jeff Flake attracted national attention during the presidential campaign when he and then-candidate Donald Trump engaged in a public war of words. Now, some of those antics seem to be coming back to haunt the first-term senator as he prepares for re-election next year.

Early polling suggests he is in deep political trouble, but mostly within the state’s Republican voting base. Former state Sen. Kelli Ward, who held Sen. John McCain to a 51-40 percent re-nomination victory in the 2016 Republican primary, returns for a battle with Flake. With the senator seemingly not backing down on his anti-Trump stance, at least one poll gives Ward a substantial lead over him among Republicans, and several surveys find the senator’s personal and job approval ratings in negative territory.

While most observers agree that Ward is not a particularly strong candidate, another potential challenger looms on the political horizon. State Treasurer Jeff DeWit was Trump’s Arizona campaign chairman. He has already said he will not seek a second term to his state post, and has been speculated upon as a possible GOP Senate challenger.

Trump has even encouraged him to run. So far, he has taken no discernible step to organizing a campaign, but a potential DeWit Senate candidacy remains a viable option. He has time. The Arizona primary isn’t until August 2018, and the candidate filing deadline doesn’t occur until May 30.

But the primary isn’t Flake’s only problem. The Democrats are sure to field a strong candidate and will spend heavily in the Grand Canyon State. Normally, a reliably Republican Arizona seat wouldn’t rank particularly high on a Democratic conversion target list, but with so few targets in 2018 because Democrats must defend 25 of 33 in-cycle seats, Flake can expect an avalanche of national Democratic money flowing into the state.

Democrats already have a strong candidate waiting in the wings. Three-term Rep. Kyrsten Sinema of Phoenix has been busy raising money and already has as much in her campaign account as Flake — more than $3 million. She acknowledges “seriously considering” the Senate race even though she previously announced a bid for re-election to her current position.

Phoenix Mayor Greg Stanton was considering a Senate candidacy but now says he will run for Sinema’s House seat if she decides to enter the statewide contest. Therefore, the Democrats seem to be lining up nicely behind her, thus increasing her general election viability.

A continuation or resolution of the Trump-Flake feud may well decide how the Senate Republican primary unfolds. The Republicans can ill-afford to lose this Senate seat, so the party leaders must ensure that the primary ends more smoothly than it began.

Though most analysts see Trump as a negative political force going into the 2018 midterm elections, it is ironic that he is becoming such a determining factor in critical Republican primaries. Trump and the Republicans’ having the ability to win despite unfavorable polling data and relentless negative news cannot again be overlooked.