In the Alabama special election for U.S. Senate, the Republican primary was shaping up as a seemingly neat contest between the Washington-ordained “establishment” choice and a maverick conservative pick.

That is, until the president tweeted about the race — flipping the predictable narrative on its head and scrambling the rivalry between Rep. Mo Brooks and Sen. Luther Strange, who was named to fill the seat left vacant by now-Attorney General Jeff Sessions.

“Senator Luther Strange has done a great job representing the people of the Great State of Alabama,” Trump tweeted late Tuesday. “He has my complete and total endorsement!”

The endorsement could prove a decisive factor in a fluid race. With any candidate unlikely to win an outright majority of the vote Tuesday, the top two vote-getters are expected meet in a run-off election in late September. Polling suggests Roy Moore, a controversial former chief justice of the Alabama Supreme Court, is likely to grab one of those two slots — leaving Brooks and Strange to duke it out over the remaining one.

The president’s decision to weigh in during the final days of the contest “is what people refer to as a game-changer,” said Perry Hooper Jr., a co-chairman of Trump’s Alabama campaign who has endorsed Strange. “I think it’s going to really help undecided voters, because Donald Trump’s popularity goes off the page here.” Strange’s campaign quickly cut an ad featuring the tweet.

But the president has thrown a curveball to his supporters who have cheered Brooks as the anti-establishment, pro-Trump choice in the race — leaving many of them bruised and baffled with just days to go until ballots are cast.

Sam Givhan, chairman of the Madison County GOP and a senior vice chairman of the state party, described “a lot of disappointment here in North Alabama” among party activists and Trump supporters, who aired their concerns Wednesday on local talk radio and social media.

“It looks like there’s some significant frustration with the president over this,” Givhan said.

For Matt Murphy, a conservative radio host in Alabama, the president’s endorsement suggested Trump “has no clue who Luther is ... and he just stabbed Mo in the back,” Murphy tweeted. “Too bad, really. Mitch [McConnell] running the show??”

Other conservative activists echoed Murphy’s concerns, expressing doubt that Trump could have made a truly informed endorsement. On WVNN radio, host Dale Jackson said Wednesday, “I don’t think [Trump] knows about what’s happening in the great state of Alabama. So, much like ignorant voters, I would prefer they shh, and let us handle it.”

Jackson’s guest for the segment was Alabama state Rep. Ed Henry, a Brooks supporter and Trump’s state campaign co-chairman, who was also reeling from the president’s decision.

“What I kept telling the people around him was, he just needs to stay out of it,” Henry said. “There’s no reason to get in it. Let the people of Alabama decide who we send to Washington, D.C., to help him.”

But, Henry speculated, “the forces of the establishment are very, very strong, and they finally got to” the president.

For Brooks and his supporters, Senate Majority Leader Mitch McConnell has emerged as a leading bogeyman in the special election — with McConnell’s Senate Leadership Fund having spent hundreds of thousands of dollars on the race to boost Strange and knock down his rivals. Meanwhile, party leaders authorized the National Republican Senatorial Committee to spend as much as $350,000 backing the incumbent.

Although McConnell no doubt welcomed the president’s endorsement, the suggestion that he was pulling the strings might be giving the Senate leader too much credit: On Twitter this week, Trump also bashed him over the Senate’s failure to advance health care legislation — suggesting the two men’s relationship is not rosy.

Brooks on Wednesday tweeted his support for Trump’s anti-McConnell tweets, adding: “McConnell & Strange don't support your agenda. I do. Reconsider endorsement @realDonaldTrump? #DitchMitch”

But Strange’s allies suggested McConnell was less of a factor in the coup than Strange himself, who aligns politically with Trump and has supported his agenda in Washington. Hooper said he had spoken with “several folks in the West Wing” in making the case for Strange and lobbying for an endorsement by the president.

“The reason he endorsed Sen. Strange was because of loyalty, with a capital ‘L,’” said Hooper. “Sen. Strange was loyal to President Trump, and vice versa.”

On Tuesday, the president called Strange with the good news “and said, ‘You have been with me, you have really helped me, I want to support you and give you my total support,’” Hooper said, based on descriptions of the call he received from the campaign manager and Strange himself. “The president said, ‘When would you like me to do that?’ And Luther said, ‘Immediately.’”

Trump remains extremely popular among Alabama Republicans — and he has loomed especially large over the rivalry between Strange and Brooks, with each boasting of their credentials as the president’s biggest supporter who would be most helpful to him in Washington.

In one of Brooks’ ads, titled “Support Trump,” he touted a campaign donation to Trump’s cause and his voting record in Congress supporting the president’s agenda, while attempting to associate Strange with McConnell. And Brooks kicked off a 23-stop bus tour last week with a distinctly Trump-ian slogan: “Drain the Swamp.”

“But then you have the anti-establishment swamp-drainer himself coming in to endorse [Strange],” said Scott Stone, a veteran Republican campaign strategist in Alabama who is unaffiliated with any of the candidates. “It’s going to give some Mo Brooks supporters pause.”

Among those supporters are some of the president’s most ardent boosters on the political right. Brooks has been endorsed by Fox News anchor and Trump-whisperer Sean Hannity, whom Brooks knows personally from a stopover by Hannity in Alabama during the early ’90s; conservative radio host Mark Levin; and commentator Laura Ingraham.

“Luther Strange is the favorite of all the people who in my mind have been a problem for conservatism in the last 20 years,” Ingraham said when she announced her endorsement.

But now the president, too, might be part of the “problem” — a revelation that has been difficult for some of his loyal backers to stomach. Levin on Monday blasted “Trump’s pathetic endorsement of Luther Strange, McConnell's RINO puppet, screwing conservatives in Alabama and across the nation.”

“I don't want to hear this outsider crap anymore,” Levin added.

But some Alabama Republicans believe the president had little to lose by endorsing Strange in the race. State Rep. Reed Ingram, in whose district Strange lives and on whose property Strange has hunted for years, predicted the endorsement would have a minor impact on the special election — and even less of an impact on the president’s reputation among Alabama Republicans.

“I don’t think it’s going to hurt the president, by no means. I don’t think it’s going to help him at all,” said Ingram, who declined to say whom he would vote for next week. “And after this race, people will forget about it, just like a lot of tweets he’s done in the past four, five or six months.”

For the moment, however, the wound is raw among pro-Trump supporters of Brooks, who thought the president would be on their side.

“I think this hurts Donald Trump more than it helps Luther Strange, honestly,” Henry said on Jackson’s show. “There are so many people out there that do believe Donald Trump is fighting the good fight, and it disappoints them to see him give in to such an establishment candidate.”