ALBUQUERQUE — Joe Arpaio, the polarizing 85-year-old immigration hard-liner pardoned by President Trump after a conviction for criminal contempt, announced on Tuesday that he is running in Arizona for the United States Senate.

The move by Mr. Arpaio, who just six months ago faced a jail sentence before he was pardoned, upended the race to replace Senator Jeff Flake, a Republican who abandoned his 2018 re-election campaign after coming under criticism from Mr. Trump.

The contenders for the seat include Representative Kyrsten Sinema, a centrist Democrat, and Kelli Ward, a conservative Republican and former state senator who aligns herself with Mr. Trump. Mr. Arpaio, the former sheriff of Maricopa County, which includes Phoenix, lost his own re-election bid for that post in 2016 to Paul Penzone, a Democrat and Phoenix police officer.

“I got a little disturbed about how some people in the Senate were treating the president,” Mr. Arpaio said in a telephone interview, explaining the motivations for his decision. “I think I can bring some new blood to Washington.”

Referring to his advanced age, Mr. Arpaio added: “I carried a gun and a badge up until not long ago, so age means nothing. I have life experience and common sense, which I intend to use for the people of Arizona.”

Mr. Arpaio quickly drew criticism after the announcement. He had come under fire repeatedly as sheriff over tactics to crack down on Latino immigrants, and was found guilty of criminal contempt in a case that made tempers flare in Arizona and around the country. Plaintiffs claimed Mr. Arpaio had regularly violated the rights of Latinos by racially profiling and detaining them.

“You lost the most populous Republican county in Arizona,” said Representative Ruben Gallego, Democrat of Arizona, in a missive on Twitter referring to the 2016 race for sheriff in Maricopa County. “Just give up this fund-raising scam now.”

The move by Mr. Arpaio ignited debate over a race that was already hotly contested and widely followed for its capacity to shift the makeup of the Senate.

Some analysts compared his entry into the race to the failed campaign of Roy S. Moore, the former judge and Trump supporter who lost a Senate bid in Alabama in December.

“He could possibly win a primary because of his popularity among a hard-core group of supporters in the G.O.P. and his national fund-raising ability,” said Tyler Montague, a Republican campaign strategist in Arizona.

“But in the end he’ll be another Roy Moore,” said Mr. Montague, referring to Mr. Moore’s contentious hard-line positions. “I think a lot of serious conservatives will realize that and reject his candidacy.”

Mr. Arpaio began his long career in law enforcement as a police officer in Washington in 1954. He later worked for the Drug Enforcement Administration in Latin America before his election as sheriff of Maricopa County in 1991.

In almost a quarter-century in that office, Mr. Arpaio developed a national reputation for severe correctional practices and a tireless crusade against illegal immigration. He opened an outdoor jail known as Tent City, turning the desert heat into a punitive element, and forced inmates to wear striped jumpsuits and pink underwear. His department conducted broad “saturation patrols” of heavily Hispanic neighborhoods, often without evidence of criminal activity, and routinely detained people beyond their court-ordered release dates so they could be handed over to federal immigration authorities.

A professed media hound, Mr. Arpaio reveled in publicity, using bold headlines and public outrage to his advantage in firing up conservatives who embraced his hard-line policies. “Arpaio was Trump before Trump was Trump,” said David Berman, professor emeritus of political science at Arizona State University.

In 2016, Mr. Arpaio, who had advanced the myth that President Barack Obama was not born in the United States, emerged as an early Trump endorser in Arizona, where Mr. Trump held no fewer than seven campaign rallies during the presidential race. But the communities Mr. Arpaio had agitated with such persistence ultimately drove him from office: He lost his bid for a seventh term as sheriff that November, pushed out by energized Latino voters. Mr. Trump would carry the state by four percentage points in the same election.

Chuck Coughlin, a veteran Republican strategist in Arizona, said in an interview that his first reaction to Mr. Arpaio’s announcement was that it could be “some kind of a joke,” referring to previous talk by Mr. Arpaio about running for governor.

“But this is a very serious Republican primary campaign,” Mr. Coughlin said, citing Mr. Arpaio’s name recognition and fund-raising prowess. “He has a strong chance in the primary but beyond that his campaign could mobilize key opposition constituencies.”

“This is a bonanza for the Democratic Party,” Mr. Coughlin added, though he noted that a Democratic challenger in the race would still need to win over many Republicans, especially women voters, to clinch the election this year.

Some of Mr. Arpaio’s critics in Arizona suggested that his entry into the race could mobilize the Latino voters who have already kept him from office once.

“Obviously he won’t follow the rules because he didn’t do it in the past,” said Yenni Sanchez Perez, 20, a teacher’s aide in Phoenix who was brought to the United States from Mexico as a child. “I’m sure the people in Arizona understand that this man is not worthy of our trust.”

But supporters of Mr. Arpaio expressed optimism about his chances.

“Sheriff Joe is a good, solid, I would say conservative person,” said Vera Anderson, 76, a Republican organizer and activist in Phoenix who is also a vocal supporter of Mr. Trump. “He would be a good choice in my opinion.”