Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The highest-ranking Republican in Congress on Saturday joined some other party members who have voiced disagreement with President Donald Trump's decision to pardon former Arizona sheriff Joe Arpaio.

A spokesman for House Speaker Paul Ryan of Wisconsin said "The speaker does not agree with this decision."

"Law enforcement officials have a special responsibility to respect the rights of everyone in the United States," Ryan spokesman Doug Andres said in an email Saturday. "We should not allow anyone to believe that responsibility is diminished by this pardon."

Arpaio, the former sheriff of Maricopa County, was convicted in July of contempt of court for disobeying a judge's order to stop detaining people on suspicion of being undocumented immigrants. Some critics have denounced Trump's pardon on Friday as a presidential endorsement of racism.

Both of Arizona's Republican senators have expressed disagreement with Trump’s pardon.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Sen. John McCain said in a statement Friday that "Arpaio was found guilty of criminal contempt for continuing to illegally profile Latinos living in Arizona based on their perceived immigration status in violation of a judge’s orders." McCain said "no one is above the law."

"The President has the authority to make this pardon, but doing so at this time undermines his claim for the respect of rule of law as Mr. Arpaio has shown no remorse for his actions," McCain said.

Sen. Jeff Flake said of the pardon on Twitter, "I would have preferred that the President honor the judicial process and let it take its course." Arpaio has said he would appeal his July 31 conviction.

A spokesperson for Senate Majority Leader Mitch McConnell on Saturday referred questions about Trump’s pardon to the White House.

A judge ruled that Arpaio committed a crime by disobeying a court order to stop detaining suspected undocumented immigrants. In 2013, a judge found Arpaio and his deputies had engaged in racial profiling against Latinos, backing up the findings of a 2011 Justice Department report.

Arpaio was known for an aggressive stance on illegal immigration and controversial policies — including jailing prisoners in a tent city and forcing detainees to wear pink underwear — that made him popular with some on the right.

In this June 8, 2017 file photo, Speaker of the House Paul Ryan speaks with reporters during his weekly news conference on Capitol Hill, in Washington, D.C. Cliff Owen / AP

But years of legal issues and costs stemming from his immigration efforts began to take a toll on his political power at home, and he was handily defeated by a Democrat in the 2016 election.

Arpaio told NBC News by phone after the pardon was announced that "I have to thank the president for standing by me and standing by law enforcement. And I'm very humbled."

Trump made no secret of his inclination to pardon Arpaio, asking the crowd at a campaign-style in Phoenix on Tuesday, "Was Sheriff Joe convicted for doing his job?" and adding, "I'll make a prediction. I think he's going to be just fine."

Arizona Republican Rep. Trent Franks said he supports Trump's pardon. "The president did the right thing — Joe Arpaio lived an honorable life serving our country, and he deserves an honorable retirement," Franks said on Twitter.

Republican Rep. Andy Biggs, whose district encompasses part of Maricopa County, applauded the pardon and said "America owes Sheriff Arpaio a debt of gratitude and not the injustice of a political witch hunt."

The NAACP on Friday said "Trump has once again shown us his true colors and his support for racism and violence" and that the pardon "has opened the gates for other bigots to follow in his footsteps."

Arpaio's sentencing phase was set to start on Oct. 5.