ST. LOUIS (AP) — Missouri residents who want to vote by mail cannot return their ballots in person but must use the postal system, a federal appeals court ruled Thursday.

The 8th Circuit Court of Appeals ruling upholds a state law that requires mail ballots be returned through the U.S. Postal Service. The court stayed a district court ruling that would have allowed voters to return their mail ballots in person.

Mail-in ballots will need to be returned soon because they must be received by election officials by Election Day in order to count.

Missouri Attorney General Eric Schmitt, representing Secretary of State Jay Ashcroft, argued in a legal brief that changing the rules for mail-in voting so close to the Nov. 3 election would confuse voters. He noted thousands of Missourians have already received their mail-in ballots, which contain instructions that they must be returned by mail, The Kansas City Star reported.

The ruling comes in a federal lawsuit filed by the Organization for Black Struggle, a St. Louis-based nonprofit, against Missouri’s mail-in ballot restrictions.