A federal judge in Washington state on Thursday granted a request from 14 states to temporarily block operational changes within the U.S. Postal Service that have been blamed for a slowdown in mail delivery, saying President Trump and Postmaster General Louis DeJoy are “involved in a politically motivated attack” on the agency that could disrupt the 2020 election.

Stanley A. Bastian, chief judge of the U.S. District Court for the Eastern District of Washington, said policies put in place under DeJoy “likely will slow down delivery of ballots” this fall, creating a “substantial possibility that many voters will be disenfranchised and the states may not be able to effectively, timely, accurately determine election outcomes.”

“The states have demonstrated that the defendants are involved in a politically motivated attack on the efficiency of the Postal Service,” Bastian said in brief remarks after a 2½-hour hearing in Yakima. “They have also demonstrated that this attack on the Postal Service is likely to irreparably harm the states’ ability to administer the 2020 general election.”

The ruling — the first major decision to come out of several lawsuits filed by states against the Postal Service — was a victory for Democratic state officials who view Trump’s persistent attacks on mail voting and DeJoy’s operational changes as part of a concerted effort to impede the vote on Nov. 3. Partisan tensions are running high as millions of Americans prepare to cast mail ballots because of the coronavirus pandemic, and mail delays have heightened concerns that voters unfamiliar with the process will be disenfranchised.

In a written order released Thursday night, Bastian laid out more than a page of specific prohibitions on the Postal Service until a final judgment is reached in the case — restrictions that could broadly affect the agency’s services. He connected the USPS policies to Trump’s broadsides against mail voting, saying the actions amount to “voter disenfranchisement.”

“It is easy to conclude that the recent Postal Services’ changes is an intentional effort on the part the current Administration to disrupt and challenge the legitimacy of upcoming local, state, and federal elections,” he wrote.

USPS spokesman Dave Partenheimer said in a statement that “while we are exploring our legal options, there should be no doubt that the Postal Service is ready and committed to handle whatever volume of election mail it receives. Our number one priority is to deliver election mail on-time.”

Added Donald Lee Moak, a Democrat who chairs the election mail committee of the USPS Board of Governors: “Any suggestion that there is a politically motivated attack on the efficiency of the Postal Service is completely and utterly without merit.”

Last month, DeJoy told lawmakers that ensuring the safe and timely delivery of election mail was his “sacred duty,” disputing accusations that changes he put in place were politically motivated. He reiterated his commitment to election mail in a call Thursday with secretaries of states and election officials around the country.

The judge’s decision could produce more tumult within the Postal Service just as states start to send out mail ballots. At least nine states have started proactively sending mail ballot applications or request forms to voters, and by Sunday about 20 states will have started distributing actual ballots through the mail, according The Post’s 50-state voting guide.

“Changes this close to an election have a cost, and that cost is usually paid in voter confusion,” said David Becker, executive director of the nonprofit, nonpartisan Center for Election Innovation & Research, adding: “What it comes down to is: Can voters rely on the Postal Service getting their ballots to them and getting them to election officials in a reasonable amount of time?”

It was unclear how the court decision will affect mail service in the short term.

The suit, filed by Washington and 13 other states, sought a broad injunction prohibiting the Postal Service from implementing operational changes, distribution center closures and removal of mail-sorting machines, among other changes, absent an opinion by the Postal Regulatory Commission.

In his decision, Bastian largely granted that request, ordering the Postal Service to reverse any instructions for mail carriers to leave mail behind at postal facilities, to stop requiring trucks to leave at set times regardless of whether the mail is ready and to allow return trips to distribution centers to ensure “timely delivery.”

The USPS must also treat all election mail according to first-class delivery standards and replace or restore the equipment required to do that. Any request to “reconnect or replace any decommissioned or removed sorting machine(s)” must be directed through the court for approval, unless the USPS has already approved it.

Some policies blamed for delivery delays have long been in place. For example, the Postal Service routinely mothballs sorting machines to cut excess capacity, USPS officials have said.

After taking office in June, DeJoy also instituted new measures he later said were aimed at cutting costs, but postal workers said they led to a curtailing of overtime and mail backlogs. John Barger, a Republican member of the Board of Governors, told a Senate panel earlier this month that DeJoy did not brief the governors on his new policies, but he said the board was “thrilled” by the postmaster general’s performance.

Concerns about the USPS’s ability to handle election mail rose during the summer amid widespread reports of mail delays. Those worries grew acute when the Postal Service sent detailed letters to 46 states and the District of Columbia warning it could not guarantee that mail ballots would arrive in time to be counted in November.

Days later, 21 states cited concerns about the election as they announced they planned to file several lawsuits over DeJoy’s operational changes.

Washington’s suit was joined by Colorado, Connecticut, Illinois, Maryland, Michigan, Minnesota, Nevada, New Mexico, Oregon, Rhode Island, Vermont, Virginia and Wisconsin.

In a complaint filed Aug. 18, the group argued that the Postal Service acted outside of its authority by making operational changes without seeking an advisory opinion from the Postal Regulatory Commission, an independent agency with broad power to review USPS’s policies and performance.

By pursuing an operational shake-up the summer before the election, the Postal Service also interfered with states’ constitutionally mandated role in setting the “time, place, and manner” of elections, the states argued.

Kristin Beneski, an assistant attorney general for Washington state, told the court that one of the changes involved instructing letter carriers to leave mail behind if it would slow down the delivery process.

“Most significantly, Postmaster DeJoy himself testified to Congress that he was responsible for this policy and that this policy was a direct cause of the delays we’ve seen,” she said.

A lawyer for the federal government argued that the Postal Service is prepared to handle the crush of election mail and that delivery delays from the summer have abated.

“The practices it has always had in place are designed to move this mail” quickly, said Joseph Borson, a trial attorney with the Justice Department, adding that the USPS understands its responsibility to the public during election season.

Borson also told the court that the agency’s warning to states was not unusual and that a similar warning was issued before the 2016 general election.

“The only thing that has changed is that the Postal Service has increased its communications with states,” he said.

Amid building public outcry over the mail delays, DeJoy announced last month that he was suspending several policies “to avoid even the appearance of any impact on election mail,” including the removal of public collection boxes and sorting machines.

He said the Postal Service would not cut post office retail hours or workers’ overtime hours and that mail-processing equipment and collection boxes would “remain where they are.”

The agency was set to remove 671 machines this summer, a job that was mostly completed when DeJoy suspended the policy, according to a removal schedule filed as part of a labor grievance by the American Postal Workers Union on June 22.

But many mail-sorting machines have already been discarded, and others were sold. Others were disassembled and had parts used for scrap or to extend the capabilities of other machines.

DeJoy, a former logistics executive and a Trump donor, has said the lone operational change he instituted was enforcing a stricter dispatch schedule of mail transportation trucks and letter carriers to their daily rounds. Postal workers and independent experts say that has caused mail to pile up in post offices and caused multiday delays in localities across the country.

A Senate report published Wednesday said that policy delayed 7 percent of the country’s first-class mail in the five weeks after it took effect. However, the Postal Service was just starting to adapt to DeJoy’s new transportation schedule, with on-time delivery rates rebounding, according to data submitted to lawmakers.

Rep. Gerald E. Connolly (D-Va.), who chairs the House subcommittee responsible for postal oversight, called Thursday’s court decision “a win for democracy and every American voter.”

“To everyone except Postmaster DeJoy, the Postal Board Governors, and congressional Republicans, the changes at the USPS are evidence of deliberate, political sabotage, and massive voter suppression on the eve of the election,” Connolly said in a statement.

Before Bastian’s ruling, Borson argued that states should have taken their complaints to the Postal Regulatory Commission then pursued appeals through the U.S. District Court for the District of Columbia.

The responsibility is “on them and on Congress for having chosen that particular mechanism,” he argued.

Meanwhile, in a call with secretaries of state and election administrators shortly before the court ruling, DeJoy sought to emphasize his commitment to voting by mail, according to people familiar with the call.

The postmaster general said he disagreed with Trump’s statements attacking the ability of the Postal Service to safely deliver mail ballots, the people said. He also said he disagreed with Attorney General William A. Barr’s claims that postal workers handling mail ballots could be subject to bribery by foreign actors or others trying to commit election fraud.

More than a dozen secretaries appeared via video on the Zoom call, while DeJoy and a number of his aides participated only by audio, according to Colorado Secretary of State Jena Griswold (D).

A sharp critic of Trump and DeJoy, Griswold grilled the postmaster general on several points, according to Maine Secretary of State Matt Dunlap (D). One line of questioning focused on the mail piece sent by USPS to postal customers across the country with general advice for mail voting that contradicted election laws in some states. Griswold successfully sued to temporarily block the mailer from being sent to voters in Colorado.

DeJoy also said he would try not to send out election materials without first consulting with election officials to ensure accuracy, according to officials who participated in the call.

“There seems to be, coming from DeJoy, the confirmation they are going to do everything they can to ensure the delivery and timeliness of all mailed ballots — that standards are going to be followed so that all of that happens — and in the future they will try to run things by election officials before public information is placed out,” said D.C. Board of Elections Executive Director Alice Miller.

Griswold said: “Actions speak louder than words and I hope we have can have a good partnership going forward.”

Amy Gardner and Michael Brice-Saddler contributed to this report.