LOS ANGELES (AP) — A federal judge on Wednesday turned down a Trump administration request to stop California from processing ballots from up to 20,000 people the government says are likely noncitizens. The judge warned the move would “wreak havoc” on the midterm elections.

U.S. District Judge David O. Carter issued the ruling while more than 3.7 million people in the state had already voted.

“Eroded trust in our democracy is irreparable. Once a vote is segregated, lasting harm has occurred,” Carter wrote. “If the Executive can discount votes and threaten an ongoing election due to unproven allegations, then our democracy is in danger. This Court declines to be a party to such process.”

Justice Department prosecutors said they would appeal the decision right away.

The ruling marks the latest legal setback for President Donald Trump as he tries to increase federal oversight of state-run elections before votes that will decide which party controls Congress for the rest of his term.

The Republican administration sued election officials in the Democratic state in mid-October. It claimed the officials missed a 48-hour deadline to review a list of 20,000 people the government alleged were likely noncitizens on the voter rolls. The administration asked the judge to make the state wait to count those ballots until immigration status could be checked.

The Justice Department filed a similar request this week in Washington state, seeking to sequester ballots from hundreds of people it suspects are not U.S. citizens. A separate lawsuit filed in Alaska last week aims to delay certification of the vote if the Republican incumbent running for U.S. Senate loses. All three states have House or Senate races that will help set the balance of power in Congress.

Judge says Justice Department’s request violates civil rights laws

Carter’s order sharply rebuked the federal demand. He said segregating ballots this late would force counties to invent new sorting methods and “risk disenfranchising an untold number of voters.” That effect, he argued, matches a voter purge and therefore breaks the National Voting Rights Act, which bars changes to voter rolls within 90 days of an election.

The federal request, Carter wrote, “would wreak havoc and disrupt the election that is already underway, create a chilling effect on election workers and voters alike, and discount the votes of United States citizens.”

California mails ballots to all 23 million registered voters. Court filings show more than 500,000 ballots had already been processed by this week, with envelopes verified and ballots removed. Los Angeles County officials testified that it would be nearly impossible to match a particular ballot to a specific voter at that stage.

Item Detail
Registered voters in California 23 million
Ballots already cast More than 3.7 million
Ballots already processed Over 500,000
People on federal list Up to 20,000
Noncitizens previously arrested 28

Carter, appointed by former Democratic President Bill Clinton, also dismissed the Justice Department’s claim that California blocked federal enforcement of the law. He noted that prosecutors had already shown they could act when they arrested 28 noncitizens who allegedly voted or registered to vote illegally.

Earlier in court, Carter had said he was inclined to appoint a special master to examine the government’s data methods. His Wednesday order took a different path and did not name one while denying the administration’s requests.

Justice Department will appeal decision

The federal government said it would file an appeal for the second time on Wednesday evening. Its first appeal went to the 9th Circuit Court of Appeals, which denied it because the district court had not yet ruled. Two of the three judges on that panel also voiced strong doubts about the lawsuit’s core arguments.

First Assistant U.S. Attorney Bill Essayli stood by the lawsuit’s claims after the ruling.

“Every day, more ballots are processed by election officials,” Essayli wrote on social media. “This ongoing emergency disenfranchises American citizens through dilution.”

Essayli, who argued for the federal government on Tuesday, has said the request would not slow the election. He maintained that the Justice Department sought only to stop the “dilution” of the vote by noncitizen ballots.

“Segregating a ballot does not prevent it from being counted later,” Essayli said. “It is designed to preserve the status quo and prevent the infection of our election with illegal ballots.”

California’s decision echoes national trend

Election law experts tracking the case called the ruling consistent with a wider pattern.

David Becker, executive director of the Center for Election Innovation and Research, said the district court’s decision “confirmed what we already know: states, not the federal government, run elections.”

He added that the DOJ’s demands on California officials so close to Election Day appeared “designed to cause chaos.”

“But fortunately, the administration’s efforts to interfere with the midterms are failing,” he said.

Jon Miller, chief program officer for the Public Rights Project, a progressive civil rights group representing Los Angeles County officials, called Wednesday’s ruling a “major victory for voters.” He said his organization remains ready for further challenges tied to broader “efforts to undermine the election, undermine the credibility of election officials and sow distrust in the electoral process.”