The case comes from Minnesota, which forbids apparel that seeks to influence voters, even if it does not name candidates or political parties. It was challenged by Tea Party groups that argued they were targeted.

The U.S. Court of Appeals for the 8th Circuit upheld the law as being in line with the prohibition on political campaigning at polling places. The court in 1992 upheld a Tennessee law that set up a 100-foot buffer around polling places.

Federal appeals courts are split on the issue of political apparel, however, and states have different rules on what can and cannot be worn.

"'Speech-free zones' cannot be reconciled with the First Amendment's free speech clause," the challengers argued in court papers. "Although this court has permitted campaign-free zones that prohibit campaign materials and active solicitation, it has never endorsed a ban on all political speech."

The case stems from a November 2010 incident in Minneapolis, where Andrew Cilek was prevented from voting while wearing a "Don't Tread on Me" T-shirt with a Tea Party logo and a button that said "Please I.D. Me." The state has no photo identification requirement.