President Trump has pardoned former Maricopa County Sheriff Joe Arpaio, just days after being advised not to pursue such action until Arpaio was sentenced for contempt.

In a statement Friday evening, the White House said Arpaio's "life and career" exemplified "selfless public service."

"Throughout his time as Sheriff, Arpaio continued his life's work of protecting the public from the scourges of crime and illegal immigration," the statement read.

It added, "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."

Arpaio was convicted in July for contempt. A federal court said in 2016 that Arpaio's policy as sheriff of using traffic stops and workplace raids to find suspected undocumented immigrants constituted racial profiling. He was convicted in July for ignoring the order to end traffic patrols targeting immigrants.

Trump had alluded to possibly pardoning the former sheriff at his Phoenix rally, coyly telling rally attendees that Apraio was "going to be just fine."

"I won't do it tonight because I don't want to cause any controversy, okay? But Sheriff Joe can feel good," Mr. Trump added.

The reversal comes after White House lawyers determined the contempt charge was reversible. They argued that the federal court order Arpaio ignored -- which served as the basis for the contempt charge -- is unconstitutional.

The White House legal team had also advised Mr. Trump to wait until Arpaio was sentenced, saying the sentence could be lenient and not include any jail time for Arpaio. Sentencing was scheduled for Oct. 5.

© 2017 CBS Interactive Inc. All Rights Reserved.