GRAND RAPIDS, Mich. (AP) – A judge has blocked Michigan law and policies that would prevent voters from taking photos of their ballot in the Nov. 8 election.

Joel Crookston of Portage sued in Grand Rapids federal court, saying his First Amendment right to free speech was violated.

READ MORE: Drew Reminisces With Alyssa Milano About Hanging Out During Their Teenage Years

Judge Janet Neff issued a preliminary injunction Monday.

State election officials had argued that the rules are intended to protect the integrity of the election. But the judge said it could be done without a sweeping prohibition.

READ MORE: Michigan Legislature OKs School Accounts Destined For Veto

The secretary of state asked Neff to freeze her order so it can file an appeal.

Crookston filed a lawsuit after learning that a picture of a ballot could get him in trouble. He took a “ballot selfie” in 2012 while voting for a write-in candidate for Michigan State University trustee. No action was taken.

MORE NEWS: HUD Official Tours Detroit, Sees City's Use Of Federal Funds

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.