(CNN) In just nine days, President Donald Trump might have badly hobbled Arizona Republicans headed into a competitive Senate race and hurt his own re-election prospects in the state.
Trump's efforts to unseat Sen. Jeff Flake in the state's 2018 Republican primary have left Trump's allies confused and divided over which of several possible anti-Flake candidates should get their support.
And the President's decision to pardon controversial former Maricopa County Sheriff Joe Arpaio -- quietly, on a Friday night, with Hurricane Harvey set to make landfall in Texas as a Category 4 storm -- handed Democrats such a potent tool to turn out Latino votes that it might not matter who the GOP puts on the ballot.
The Arpaio pardon is sure to please Trump's base -- particularly those who favor a strict crackdown on immigration, many of whom attended his campaign rally Tuesday night in Phoenix, the Maricopa County seat.
But it also could come at a steep political cost.
While Maricopa is one of the few major urban counties in the United States that still backs Republican presidential candidates, Trump won by a paltry 3.4 percentage points there -- much worse than the 12 points by which Mitt Romney bested former President Barack Obama in the county in 2012.
Trump took the state by just 3.5 points -- a smaller margin of victory than the traditional swing states of North Carolina, Iowa and Ohio.
Arpaio, meanwhile, was easily ousted last year after 24 years in office as Maricopa County sheriff. Democratic challenger Paul Penzone won 56% to Arpaio's 44%.
That means a substantial share of Trump's supporters in Maricopa County -- more than enough to swing the key county, which made up about half of Trump's margin of victory and the entire state -- voted against Arpaio last year.
Arpaio is a deeply controversial figure, in part for his immigration sweeps that targeted Latino neighborhoods and the conditions in his county jail, which included an outdoor "Tent City" in the Arizona desert. He was convicted of criminal contempt last year for defying a 2011 court order to stop detaining people based on suspicion of their immigration status with no evidence those people had committed another crime.
"Regarding the Arpaio pardon, I would have preferred that the President honor the judicial process and let it take its course," Flake tweeted Friday night, in an acknowledgment of the political fallout of Trump's pardoning of Arpaio.
Arizona's senior senator, Republican John McCain, said in a statement on the pardon that "no one is above the law and the individuals entrusted with the privilege of being sworn law officers should always seek to be beyond reproach in their commitment to fairly enforcing the laws they swore to uphold."
"Mr. Arpaio was found guilty of criminal contempt for continuing to illegally profile Latinos living in Arizona based on their perceived immigration status in violation of a judge's orders," McCain said. "The President has the authority to make this pardon, but doing so at this time undermines his claim for the respect of rule of law as Mr. Arpaio has shown no remorse for his actions."
Democrats, meanwhile, came out swinging hard Friday night.
Rep. Kyrsten Sinema, the Democrat preparing to run for the Senate against Flake in 2018, tweeted: "I am dismayed by the President's decision to pardon Joe Arpaio. Arpaio hurt Arizonans & cost taxpayers a great amount of grief & money. He should be held accountable. No one is above the law."
"Prejudice doesn't deserve a pardon," said Democratic National Committee Chairman Tom Perez. "Donald Trump just gave a free pass to his buddy Joe Arpaio, the nation's most notorious agent of racism and bigotry, during a natural disaster that could hurt millions. That's not presidential, that's a coward."
Trump had teased that the Arpaio pardon was coming at his campaign rally in Phoenix on Tuesday night.
At the same rally, he took a shot at Flake without mentioning him by name, calling the Republican senator "weak on borders, weak on crime" and claiming "nobody knows who the hell he is."
But Trump, who has wanted Flake ousted since 2016, telling Arizona Republicans before the election that he'd spend $10 million of his own money against the senator, might have complicated that task, too.
On August 17, he tweeted praise for Kelli Ward, the conservative former state senator who drew nearly 40% support in a primary against McCain last year and is running in 2018 against Flake.
But Trump-aligned Arizona Republicans who want to defeat Flake see Ward as a weak candidate. So Trump's event organizers told hundreds of Ward supporters they couldn't bring pro-Ward signs into his Tuesday-night rally. And Ward was only allowed in with the crowd.
Meanwhile, Trump met backstage with a group that included former state GOP chair Robert Graham and state treasurer Jeff DeWit -- both potential Flake challengers -- as well as Rep. Trent Franks. The President urged the group to decide soon who would run against the man he calls "the flake."
But the mixed signals had already been sent. As news of the backstage huddle broke Wednesday afternoon, pro-Trump media personality Sean Hannity said in an interview with Ward on his radio show that she could defeat Flake.
"I'm throwing my support early behind you," Hannity said.
That set off a frantic series of phone calls among Trump's allies in Arizona, who were gearing up for a run against Flake -- but by someone else.