(CNN) - The US Postal Service must prioritize election mail and reverse some key policy changes imposed by Postmaster General Louis DeJoy, a federal judge ruled on Monday, saying that "managerial failures" at the agency undermined the public's faith in mail-in voting.
US District Judge Victor Marrero in New York's Southern District became the second federal judge to side against USPS in the past week. A judge in Washington state ordered many similar changes on Friday and blasted the Trump administration for what he called a "politically motivated attack" on USPS.
In the Monday ruling, Marrero said USPS will be required to treat all election mail as first-class mail or priority mail express, and that USPS will need to "pre-approve" all overtime requests for the two weeks surrounding Election Day, to make sure absentee ballots are processed properly.
"The right to vote is too vital a value in our democracy to be left in a state of suspense in the minds of voters weeks before a presidential election, raising doubts as to whether their votes will ultimately be counted," Marrero wrote.
"While the court has no doubts that the Postal Service's workforce comprises hardworking and dedicated public servants, multiple managerial failures have undermined the postal employees' ability to fulfill their vital mission," he added.
These changes will go into effect on Friday, the judge said. He told the parties to reach a settlement that includes his directives, but if they don't reach an agreement by midday Friday, a judicial order imposing the changes will automatically kick in.
If USPS can't agree to put in place these changes, Marrero says he'll take several steps to force USPS to improve its mail delivery and policies under a court order.
He will order the USPS to draft, and implement, a cohesive plan to restore on-time delivery performance to pre-July levels. USPS must then produce service reports and variance reports for the court.
"The Postal Service is reviewing the court's decision," USPS spokesperson Marti Johnson said, responding to the decision.
"There should be no doubt, however, that the Postal Service is ready and fully committed to handling expected increased volumes of Election Mail between now and the conclusion of the November 3rd election," Johnson added. "Our number one priority is to deliver the nation's Election Mail securely and in a timely fashion."
Under a court order, the USPS would have to pre-approve all overtime between October 26 and November 6. USPS would also have to circulate a company-wide memo making clear that late trips for mail trucks will be encouraged for transporting election mail and do not require special approval -- undoing some of DeJoy's signature policy changes.
DeJoy imposed significant restrictions on late and extra trips on July 10, which the USPS has since acknowledged caused significant mail delays.
The USPS has claimed that those delays have improved, but it has still not returned to its pre-July levels.
"The Postal Service has long promised that '[n]either snow nor rain nor heat nor gloom of night stays these couriers from the swift completion of their appointed rounds," said Remy Green, an attorney for the plaintiffs that sued USPS, which include New York voters and candidates for public office. "The Court rightly added the obvious footnote: fixing an election and cost-cutting cannot cut it as an exception to that promise."
Ali Najmi, another attorney for the plaintiffs, told CNN they would be speaking with USPS attorneys later today to start talking about settling the case.
This story has been updated with additional comment from attorney Remy Green.