SEATTLE — A U.S. judge on Thursday blocked controversial Postal Service changes that have slowed mail nationwide, calling them “a politically motivated attack on the efficiency of the Postal Service” before the November election.

Judge Stanley Bastian in Yakima, Washington, said he was issuing a nationwide preliminary injunction sought by 14 states that sued the Trump administration and the U.S. Postal Service.

The states challenged the Postal Service’s so-called “leave behind” policy, where trucks have been leaving postal facilities on time regardless of whether there is more mail to load. They also sought to force the Postal Service to treat election mail as First Class mail.

The judge noted after a hearing that Trump had repeatedly attacked voting by mail by making unfounded claims that it is rife with fraud. Many more voters are expected to vote by mail this November because of the COVID-19 pandemic, and the states have expressed concern that delays might result in voters not receiving ballots or registration forms in time.

“The states have demonstrated the defendants are involved in a politically motivated attack on the efficiency of the Postal Service,” Bastian said.

He also said the changes created “a substantial possibility many voters will be disenfranchised.”

Bastian, an appointee of former President Barack Obama, said he planned to issue a written order by Friday, but that it would be substantially the same as the injunction sought by the states.

Postal Service spokesman Dave Partenheimer said in a statement the organization is reviewing its legal options, but that “there should be no doubt that the Postal Service is ready and committed to handle whatever volume of election mail it receives.”

Lee Moak, a member of the USPS Board of Governors, called the notion any changes were politically motivated “completely and utterly without merit.”

Following a national uproar, Postmaster General Louis DeJoy, a major donor to President Donald Trump and the GOP, announced he was suspending some changes — including the removal of iconic blue mailboxes in many cities and the decommissioning of mail processing machines.

But other changes remained in place, and the states — including the battlegrounds of Michigan, Wisconsin and Nevada — asked the court to block them. The states sought to have the “leave behind” policy revoked; election mail treated as First Class mail rather than as slower-moving categories; the reinstallation of any mail processing machines needed to ensure the prompt handling of election mail; and that the court hold DeJoy to his promise to suspend other changes.

Led by Washington Attorney General Bob Ferguson, the states said the Postal Service made the changes without first bringing them to the Postal Regulatory Commission for public comment and an advisory opinion, as required by federal law. They also said the changes interfered with their constitutional authority to administer their elections.

At the hearing, Justice Department attorney Joseph Borson sought to assure the judge that the Postal Service would handle election mail promptly, noting that a surge of ballots in the mail would pale in comparison to increases from, say, holiday cards.

He also said slow-downs caused by the “leave behind” policy had gotten better since it was first implemented, and that the Postal Service in reality had made no changes with regard to how it classifies and processes election mail. DeJoy has repeatedly insisted that processing election mail remains the organization’s top priority.

“There’s been a lot of confusion in the briefing and in the press about what the Postal Service has done,” Borson said. “The states are accusing us of making changes we have not in fact made.”

Voters who are worried about their ballots being counted “can simply promptly drop their ballots in the mail,” he said, and states can help by mailing registration form or absentee ballots early.

Borson also insisted that the states also were required to bring their challenge not in court, but before the Postal Regulatory Commission itself — even though by law the commission has 90 days to respond. Bastian rejected that notion, saying there was no time for that with the election just seven weeks away.

The states conceded that mail delays have eased since the service cuts first created a national uproar in July, but they said on-time deliveries remain well below their prior levels, meaning millions of pieces of mail that would otherwise arrive on-time no longer are.

They also noted some of the effects the changes had already wrought: Michigan spent $2 million earlier this year on envelopes that met election mail standards — only to learn that the Postal Service wouldn’t treat them as first class mail. In Madison, Wisconsin, the number of ballots that weren’t counted because they arrived late for the August primary doubled from the August 2018 primary.

Further, they cited research from information technology consultant Mynor Urizar-Hunter, who helped start a website tracking the USPS changes, noting that 78% of the machines slated for removal were in counties won by Democrat Hillary Clinton in 2016.

The states suing are Washington, Michigan, Wisconsin, Nevada, Colorado, Connecticut, Illinois, Maryland, Minnesota, New Mexico, Oregon, Rhode Island, Vermont and Virginia — all led by Democratic attorneys general.

Pennsylvania is leading a separate multistate lawsuit over the changes, and New York and Montana have filed their own challenges.