DETROIT (AP) — A federal judge’s order that would have prevented Michigan from enforcing a state law to keep voters from taking photos of their ballot in the Nov. 8 election has been overturned.

The 6th U.S. Circuit Court of Appeals ruled 2-1 Friday that Joel Crookston can present the First Amendment issues raised in his lawsuit against the state, but it will have to wait until after the election.

Michigan’s ban on exposing completed ballots has been in place since 1891.

Crookston, of Portage, took a ballot selfie in 2012 while voting. He filed a lawsuit last month after learning a picture of a completed ballot could get him in trouble. No action was taken against Crookston.

State election officials said the rules are intended to protect the integrity of the election.