PHOENIX — A federal judge rejected a bid Friday to block an Arizona law prohibiting get-out-the-vote groups from collecting early ballots, striking a blow against Democrats.

U.S. District Court Judge Douglas L. Rayes shot down Democratic groups’ request for an injunction to keep the law from taking effect. In his opinion, Rayes said lawyers representing state and national Democratic groups failed to show that the law would disparately impact minority voters.

It “simply regulates an administrative aspect of the electoral process,” Rayes wrote.

The law makes so-called “ballot harvesting,” returning someone else’s ballot to election officials, a felony in most cases.

The decision is a victory for Republicans, who advanced House Bill 2023 through the Legislature earlier this year. Republicans argued that ballot harvesting can lead to election fraud. Gov. Doug Ducey signed it into law in early March, saying it will ensure a chain of custody between the voter and the ballot box.

The judge found that preventing absentee voter fraud was sufficient reason for the law.

Arizona GOP Party Chairman Robert Graham applauded the judge’s decision, saying it will uphold the integrity of all elections. “Ballot harvesting is a practice used by the Democrats and their leftist allies in Arizona that was rife with opportunity for manipulation and outright fraud,” Graham said in a statement.

Arizona Democratic Party officials said they planned to appeal.

“Unlike the state’s Republican leadership, the Arizona Democratic Party does not believe that it should be a crime for one neighbor to help another neighbor vote,” party Executive Director Sheila Healy said in a statement. “Rather, the Democratic Party is committed to tearing down any barriers that are placed between any Arizonan and their right to vote.”

Both parties have used ballot collection to boost turnout during elections by going door-to-door and asking voters if they have completed their mail-in ballot. If they have not, they urge them to do so and offer to return it to elections offices.

Democrats have used the method aggressively in minority communities and argue their success prompted the new GOP-sponsored law.

The lawsuit filed by the Democratic National Committee, Democratic Senatorial Campaign Committee, state Democratic Party and numerous voters alleged the law violated the federal Voting Rights Act. In their injunction request, they argued there has been a lengthy history of discrimination at the polls in Arizona and that the law was orchestrated to suppress voter turnout among Democratic voters.

Attorney General Mark Brnovich and Secretary of State Michele Reagan have denied the accusations.