President Trump's decision to announce the pardon of controversial convicted former sheriff Joe Arpaio at 8 p.m. on a Friday as menacing Hurricane Harvey was about to make landfall in Texas did not go unnoticed.

Arpaio, convicted of criminal contempt of court for violating a federal court order to stop profiling Latinos in Arizona, was controversial enough, but the White House announcement drew bipartisan criticism. The news came two hours before Harvey made landfall as a Category 4 hurricane along the Texas coastline. Arpaio is seen as a political ally of the president, and they share similar views on immigration.

Sen. Richard Blumenthal, D-Connecticut, said Mr. Trump issued the pardon, "Under cover of hurricane and Friday night darkness."

Under cover of hurricane and Friday night darkness, Trump pardons Arpaio and flouts rule of law - already producing backlash. https://t.co/frdUJkG5Nt — Richard Blumenthal (@SenBlumenthal) August 26, 2017

Senate Minority Leader Chuck Schumer, D-New York, said the president appeared to be using Harvey as a cover to pardon Arpaio.

As millions of people in TX and LA are prepping for the hurricane, the President is using the cover of the storm to 1/ — Chuck Schumer (@SenSchumer) August 26, 2017

Pardon a man who violated a court's order to stop discriminating against Latinos and 2/ — Chuck Schumer (@SenSchumer) August 26, 2017

Ban courageous transgender men and women from serving our nation's Armed Forces. 3/ — Chuck Schumer (@SenSchumer) August 26, 2017

Rep. Frank Pallone, D-New Jersey, pointed out that Mr. Trump has pardoned a convicted sheriff before selecting an administrator for the National Oceanic and Atmospheric Administration (NOAA), with Harvey pelting the Texas coastline.

Apparently #Trump has time for an undeserved pardon but no time to find a @NOAA administrator. — Rep. Frank Pallone (@FrankPallone) August 26, 2017

Others criticized Mr. Trump for issuing the pardon at all.

Get Breaking News Delivered to Your Inbox

Doug Andres, a spokesman for Speaker of the House Paul Ryan, R-Wisconsin, told the Wall Street Journal Ryan does not agree with the pardon.

Arizona's senators were particularly vocal among Republicans. In a statement, Sen. John McCain, R-Arizona, said the pardon, "undermines his claim for the respect of rule of law, as Mr. Arpaio has shown no remorse for his actions."

"No one is above the law and the individuals entrusted with the privilege of being sworn law officers should always seek to be beyond reproach in their commitment to fairly enforcing the laws they swore to uphold," McCain said. "Mr. 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. 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."

Sen. Jeff Flake, R-Arizona, said he would have preferred the judicial process to play out, instead of the president intervening.

Regarding the Arpaio pardon, I would have preferred that the President honor the judicial process and let it take its course. — Jeff Flake (@JeffFlake) August 26, 2017

Another Republican, Rep. Justin Amash of Michigan, said the president pardoned someone who violated people's constitutional rights.

Arpaio was convicted of defying court order to stop violating #4thAmendment. It's a pardon of a govt official who ignored Bill of Rights. — Justin Amash (@justinamash) August 26, 2017

Democrats also criticized the president's use of the pardon at all. Sen. Bob Casey, D-Pennsylvania, called the decision "wrong" and an abuse of the pardon process.

This is an abuse of the pardon process & an endorsement of racial profiling. It is wrong. https://t.co/Wu4jmGYi9S — Senator Bob Casey (@SenBobCasey) August 26, 2017

Sen. Chris Murphy, D-Connecticut didn't mince words, saying the pardon was a "middle finger" to America.

The Arpaio pardon is basically a big middle finger to America. A loud, proud declaration that this Administration supports racism. — Chris Murphy (@ChrisMurphyCT) August 26, 2017

For days, the White House had declined to say if or when the sheriff would be pardoned.

Mr. Trump had hinted at a possible pardon for Arpaio at a combative, campaign-like rally in Arizona on Tuesday.

"Do the people in this room like Sheriff Joe?" the president said to a cheering crowd.

"So was Sheriff Joe convicted for doing his job?" the president said, gauging his audience's support for a pardon. "You know what, I'll make a prediction: I think he's going to be just fine, OK? But I won't do it tonight because I don't want to cause any controversy. But Sheriff Joe should feel good."

Arpaio's pardon wasn't the only news the White House released on Friday as Hurricane Harvey approached.

Sebastian Gorka, a security adviser to the president, left the White House on Friday, and the president signed a memo to the Pentagon outlining his controversial ban on transgender troops in the military.