(Reuters) - Joe Arpaio, a former Arizona sheriff known for his tough stance on illegal immigration and who received a criminal pardon from President Donald Trump, announced on Tuesday that he would run for the U.S. Senate.

Arpaio’s positions on immigration and treatment of prisoners while sheriff made him a national conservative celebrity and liberal foe. He will seek to replace retiring Republican Senator Jeff Flake, who has been a frequent critic of Trump.

The 85-year-old Arpaio was convicted in July of criminal contempt of court in a racial profiling case, but subsequently received a pardon from the president. In announcing his bid, Arpaio immediately positioned himself as a staunch supporter of Trump, who won Arizona by 5 percentage points in the 2016 presidential election.

Arpaio’s candidacy is likely to generate headaches for Republicans in Washington, who are desperate to hold on to the Arizona Senate seat or risk losing control of the chamber.

Republicans hold a slim 51-49 majority in the Senate, and will defend eight seats in November’s election - when voters will decide who holds 34 Senate and all 435 House seats. Democrats, bolstered by an unexpected win in the Alabama special Senate race, are hoping to capitalize on unhappiness with Trump to gain control of Congress.

The seat is being vacated by Flake, who in announcing his retirement, called Trump’s manner of governing “reckless, outrageous and undignified.”

Flake dismissed Arpaio’s candidacy on Tuesday.

“I don’t think he’s in it for the long haul,” Flake said on MSNBC. “I think by this time next month, he may not be in the race.”

Democrats could also use Arpaio’s record to smear Republican candidates elsewhere by association, invoking the former sheriff’s criminal conviction and views on immigration.

FILE PHOTO: Maricopa County Sheriff Joe Arpaio arrives at a campaign rally for Republican U.S. Presidential candidate Donald Trump in Phoenix, Arizona, U.S. June 18, 2016. REUTERS/Nancy Wiechec/File Photo

Arizona holds one of the latest primary contests, not voting until August, which could allow Arpaio to remain in the spotlight for months.

NAME RECOGNITION

Arpaio could use his celebrity and a vast mailing list to raise money without the support of deep-pocketed donors.

“Joe Arpaio has 100 percent name recognition with voters,” Stan Barnes, a Republican political strategist in Arizona, said in a telephone interview. “And for all intents and purposes he’s going to be wearing a Donald Trump mask and run as if he is Donald Trump, and with that added together he cannot be dismissed as a candidate.”

After 24 years in office, Arpaio, who dubbed himself “the toughest sheriff in America,” lost a bid for re-election in 2016 in Arizona’s Maricopa County, one of the largest counties in the United States. But he remained in the spotlight as legal challenges to his tenure continued.

A federal judge ruled in July that Arpaio wilfully violated a 2011 injunction barring his officers from detaining Latino drivers solely on the suspicion that they were in the county illegally.

The U.S. Department of Justice said in a 2011 report that Arpaio had nurtured a culture in his office of racially discriminating against Latinos, in breach of the U.S Constitution, a charge Arpaio denied.

His tactics made him one of the most widely known sheriffs in the country. He erected a tent city to house prisoners, reinstated chain gangs, made inmates wear uniforms that were pink or had old-fashioned black-and-white stripes and forbade them coffee, salt and pepper.

Arpaio joins an already contentious primary contest - the latest example of an ongoing internal struggle in the Republican Party between mainstream officials and more conservative factions.

Arpaio will have to compete for right-wing support with candidate Kelli Ward, a former doctor and Arizona state senator who has already made a failed bid for the U.S. Senate as a conservative.

Ward has “great respect” for Arpaio and welcomed him to the race, her campaign chairman, Ed Rollins, said in a statement.

“His candidacy shows that conservatives in Arizona are fed up with the status quo and know that we need senators who support President Trump and the (president’s) America First agenda,” Rollins said.

Republican leaders have been pushing for Martha McSally, seen as a more moderate candidate, to enter the race. The House of Representatives lawmaker is expected to announce her run on Friday, CNN reported.

The winner of the Democrat primary is likely to be Kyrsten Sinema, the first openly bisexual person elected to Congress.