TUCSON, Arizona — Joe Arpaio is going down, standing by Donald Trump.

The infamous former Maricopa County sheriff is likely making his last stand for a spot in public life by running in the Republican Senate primary. He’s reminding voters of his close ties to the president and his own Trumpian record on immigration and crime that dates back well before the president ever ran for office.

“All I can say is I’ve had a relationship with the president from day one,” Arpaio said to a crowd of local Republicans, including some of his most ardent supporters. The stop was one of several on a relatively muted “ICE tour” that his campaign is doing this week.

Prior to entering the race, Arpaio was mired in a longstanding criminal court case. In 2011, a federal judge issued an injunction ordering him to stop racially profiling Latino drivers as part of his efforts to apprehend unauthorized immigrants. He continued to do so, however, and was ultimately convicted of criminal contempt of court. Trump, who became his personal friend and political ally, went on to pardon him last year, though the president has stopped short of endorsing Arpaio in the race.

Arpaio’s prospects aren’t good. Polling puts him at 13 percent, behind his competitors, Kelli Ward, polling at 27 percent, and Martha McSally, the frontrunner, at 47 percent. His campaign, meanwhile, is in freefall just days before voters go to the polls.

It’s a low point for a man who was once a popular figure in Arizona politics and who drew national attention for his extreme positions. He was a villain on the left and a hero on the right among anti-immigration hardliners.

For those who do support Arpaio, he’s a public figure cut from the same cloth as Trump, who is willing to say things about immigrants and convicted criminals that no one else will. Arpaio rose to prominence for his aggressive approach to border security, tactics that included detaining Latino residents solely on suspicion of their immigration status. He’s also helped establish tent cities, prison setups that forced inmates to live and work in the brutal Arizona heat.

“He’s seen it, he’s done it. The tomfoolery — he can cut through it,” said Wendell Holmes, a longtime supporter who brought a copy of Arpaio’s first book to the Tucson event. When asked what he made of the racial profiling charges, Holmes added, “I think he was doing his job because nobody else wants to do it.”

Despite some warm feelings for the former sheriff, however, most Republicans believe it’s time for someone new. The sheriff who burst onto the national stage with his unmatched enthusiasm for cracking down on immigrants is about to slide off quietly.

“Sheriff Joe Arpaio, at one point in time, had some of the most favorable ratings in the state,” says Nathan Brown, a political consultant based in Tempe who backs McSally. “There’s a lot less support for Sheriff Joe Arpaio these days … I think he represents a faction that once was.”

Others are more practical about their decision. They don’t think he’d win in a general election.

“I love Sheriff Joe,” Scottsdale resident Allison Mary told Arizona Republic reporter Yvonne Wingett Sanchez. “He’s a wonderful person. I’m just sorry he’s not still our sheriff. He would be a good senator, but I don’t think he could beat [Democrat] Kyrsten Sinema.”

Arpaio seems well aware of this dynamic. “They all want my picture — doesn’t mean they’re going to vote for me,” he said during his speech. “They can sell it for 99 cents plus tax.”

Some Republicans believe Arpaio is even actively harming the conservative cause, watering down Ward’s vote. She is the other Trump-style candidate in the race. If she loses, the most establishment-leaning candidate, McSally, will take the nomination.

“In this race, especially, you have an establishment candidate, you have ‘the candidate,’ and you have a spoiler,” says Adriana Pfund, an account executive from Tucson who supports Ward. “Joe Arpaio is a spoiler.”

Arpaio sees Ward’s alignment with Trump as disingenuous and argues that McSally’s is even worse. Ward is seen as previously backing Ted Cruz, and McSally declined to support the president’s candidacy in 2016.

“She’s got nothing to do with Trump, wouldn’t even say if she voted for him. Now, all at once, she’s a big, big supporter of Trump,” Arpaio said of McSally. “She just learned how to spell his name now. What does that mean, where’s the heart, where’s the loyalty? Probably the biggest flip-flopper I’ve ever seen.”