A federal judge on Wednesday rejected the Trump administration’s attempt to force California to set aside 20,000 ballots. Judge David O. Carter said the move would wreak havoc on the ongoing election. The administration had claimed these voters were noncitizens, but the court ruled against their urgent legal demand.

The judge ruled that no immediate action was necessary, dealing another setback to the administration as it moves to target voting by noncitizens.

A federal judge on Wednesday rejected the latest Trump administration attempt to intervene in the midterm elections, denying an effort to force California to immediately set aside 20,000 ballots from people the administration suspects are "likely noncitizens."

In a scathing ruling that he had signaled at a hearing the previous day, Judge David O. Carter wrote that the administration's demand for urgent action "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."

"Never before in American history has the federal government, on the eve of an election, sought to coerce a state and local government to abandon their own constitutional elections procedures and bend to the will of the executive branch," wrote Judge Carter, of Federal District Court for the Central District of California. "In bringing this lawsuit, the executive would have this court believe that it reigns as a sole sovereign. But California and its people are sovereign, too."

The ruling, which federal prosecutors are expected to appeal, came amid an escalating legal battle between the Justice Department and state election officials as President Trump seeks to demonstrate that huge numbers of noncitizens have voted illegally in U.S. elections. Multiple studies have found such fraud is exceedingly rare.

In his ruling, Judge Carter noted that the administration had filed at least 31 lawsuits seeking complete voter rolls from states in federal courts across the country -- a campaign that was "indicative of a broad, ongoing pattern of attempted election interference."

"Out of the twenty-six cases that have been decided, the D.O.J. has prevailed in precisely zero," the judge added.

Subscribe to The Times to read as many articles as you like.