President Trump issued a pardon on Friday for controversial Arizona sheriff Joe Arpaio, who was convicted for disobeying a judge’s order to stop racial profiling.

Trump, who strongly hinted at the pardon during a rally in Phoenix earlier this week, said in a statement on Friday that the sheriff’s life and career “exemplify selfless public service.”

“Sheriff Joe Arpaio is now eighty-five years old, and after more than fifty years of admirable service to our Nation, he is worthy candidate for a Presidential pardon,” the statement said.

Arpaio responded by thanking Trump and attacking President Obama.

“Thank you @realDonaldTrump for seeing my conviction for what it is: a political witch hunt by holdovers in the Obama justice department!” he tweeted.

Arpaio who lost a bid for re-election in Arizona’s Maricopa County in November after 24 years in office, was known for jailing people in a “tent city.”

He also was a member of the birther movement which claimed Obama was a citizen of Kenya and not a legitimate president.

On Tuesday, Trump sent the Pheonix rally into a frenzy when he hinted that a pardon may be in the future.

“Do the people in this room like Sheriff Joe?” Trump said. “So was Sheriff Joe convicted for doing his job? … I’ll make a prediction: I think he’s going to be just fine.”

The mayor of Pheonix had asked the president not to pardon the former Sheriff at the rally because it might create a “volatile” situation after the violence and racial strife in Charlottesville, Virginia.

Arpaio was convicted in July for violating an injunction that barred his officers detaining Latino motorists solely on suspicion that they were illegal immigrants.

Arpaio admitted to disobeying the court order but said it did not meet a criminal standard.

He also blamed Obama, saying the prosecution was a politically motivated.

He is scheduled to be sentenced for his crimes on Oct. 5.