Aug. 26 (UPI) -- A group of attorneys general from 24 states and the governor of Pennsylvania have filed a lawsuit against the U.S. Postal Service to prevent the service from enacting a new rule that gives it control over mail-in ballots just before November's midterm elections.

New York Attorney General Letitia James released a statement to the press that her office had joined the suit.

"Across the country, states are already deep into preparations for the 2026 elections. Now, at the last moment, the federal government is attempting to meddle in those preparations and potentially threaten countless Americans' right to vote," James said in the statement. "The USPS has no authority to decide who can and cannot vote by mail. This new policy will just create confusion, unnecessary costs, and unacceptable risks for voters going into Election Day, and my office is going to court to stop it."

The rule forces states to hand over lists of every eligible voter to the USPS and requires federal pre-approval of ballot envelope designs. Any ballot mailed to or by a voter missing from the federal list, or using an envelope USPS hasn't approved, could be rejected and not delivered, regardless of whether that voter is fully eligible and registered under state law.

Homeland Security Secretary Markwayne Mullin in July threatened election officials with jail time over election security.

On Monday, The U.S. Supreme Court ruled that Trump can begin implementing the executive order in many states and Washington, D.C. States now have just weeks before the November elections to comply, meaning they would have to compile the lists and redesign envelopes, then get federal approval. They would also have to create new systems to transmit voter lists to USPS.

The ruling Monday means that the Department of Homeland Security can begin compiling state-specific lists of people it believes are eligible to vote in the states that had challenged the executive order. The ruling didn't address the legality of the rule.

"If the Postal Service's final rule harms the states, they may challenge that rule," the ruling said.

If states and local election officials can't comply in time, eligible voters won't get their ballots, the New York press release said.

The USPS processed nearly 100 million ballots during the 2024 general election, and about 30% of American voters voted by mail, the release said.