A U.S. judge on Thursday granted a request to temporarily block controversial Postal Service changes that have been accused of slowing mail nationwide, calling them "a politically motivated attack " ahead of the 2020 presidential election.

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

The states, all led by Democratic attorneys general, 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.

FILE: Mail delivery vehicles are parked outside a post office in Boys Town, Neb.  (AP)

The judge noted after a hearing that Trump had repeatedly attacked voting by mail by claiming that it is rife with fraud.

American voters are expected to vote by mail in record numbers this November because of the lingering COVID-19 pandemic. 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, adding that the changes created "a substantial possibility many voters will be disenfranchised."

Postal Service spokesman Dave Partenheimer said in a statement that "there should be no doubt that the Postal Service is ready and committed to handle whatever volume of election mail it receives."

Following a national uproar, Postmaster General Louis DeJoy, a major donor to President Trump and to Republicans, announced he was suspending some changes — including the removal of iconic blue mailboxes in many cities and the decommissioning of mail processing machines. Other changes remained in place, however, and the states have asked the court to block them.

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.

PENNSYLVANIA SUPREME COURT EXTENDS STATE MAIL BALLOT DEADLINE TO 3 DAYS AFTER ELECTION

At the hearing, Justice Department attorney Joseph Borson said slow-downs caused by the "leave behind" policy had gotten better since it was first implemented, and that the Postal Service had made no changes with regard to how it classifies and processes election mail.

"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.

CLICK HERE TO GET THE FOX NEWS APP

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.

The Associated Press contributed to this report.