A federal judge in Boston has temporarily blocked the U.S. Postal Service from enforcing central parts of its new mail ballot rule, the latest setback to President Donald Trump's effort to reshape voting by mail before the November midterms.

U.S. District Judge Indira Talwani issued the temporary restraining order Thursday night. It runs for 14 days and applies to any election held on or before Nov. 3, The Hill reported. The frozen provisions include mandatory envelope design standards, required registration in a Postal Service electronic portal, mandatory uploads of state voter data, and language that would have let the agency refuse to mail ballots it judged noncompliant.

The rule grows out of an executive order Trump signed in March. It directed the Postal Service to supply mail ballots only to states that turn over lists of eligible voters drawn from citizenship data. Talwani has held repeatedly that a president cannot insert the federal government into the running of elections without congressional approval, and she has written that compliance by the states before the midterms would be practically impossible, according to NBC News.

Getting to Thursday's order took a detour. On Aug. 24 the Supreme Court stayed a separate injunction in a case brought by California and other states, finding the challenge premature because the Postal Service had not yet issued a final rule. Talwani then vacated her own nationwide injunction on Wednesday. Voting rights groups and a coalition of states responded by filing new claims aimed at the finished rule rather than the executive order behind it.

The order covers two related cases. One was brought by the League of Women Voters of Massachusetts and allied organizations. The other was filed Wednesday by 23 states, the District of Columbia and Pennsylvania Gov. Josh Shapiro, the World Tribune reported.

Talwani found that any government interest in addressing an unsubstantiated problem through likely unconstitutional means was outweighed by the risk of widespread disenfranchisement among voters who rely on mail ballots, according to the ACLU of Massachusetts, which represents several of the plaintiffs.

Responding to earlier rulings in the case, the White House has said it will continue pursuing what it describes as lawful steps to secure American elections. About nine weeks remain before Election Day, leaving the administration little room to implement the rule even if it wins on appeal.