WASHINGTON (Reuters) - U.S. Supreme Court justices on Wednesday debated the legality of a Minnesota law barring voters from wearing political apparel at polling places, struggling to draw the line between protecting free speech and preventing voter intimidation.

FILE PHOTO: A view of the U.S. Supreme Court building is seen in Washington, DC, U.S., October 13, 2015. REUTERS/Jonathan Ernst/File Photo

Minnesota’s law, challenged by conservative activists, prohibits badges, buttons, hats, T-shirts or other items with overly political messages inside polling sites during elections. At least nine other states have similar laws.

During a one-hour argument before the nine-member court, several justices peppered attorneys on both sides with hypothetical examples of apparel, challenging them to say whether they would be acceptable in a voting site or not.

Liberal Justice Elena Kagan wondered about “Make America Great Again” and “Resist,” popular slogans for supporters or opponents of President Donald Trump.

David Breemer, the challengers’ lawyer who argued that the law violates the guarantee of free speech under the U.S. Constitution’s First Amendment, said both slogans should be protected as “legitimate speech” allowed in a polling place.

Conservative Justice Anthony Kennedy then asked him, “Why should there be any speech there at all? ... You’re there to vote.”

“Your Honor, because the First Amendment doesn’t stop at the polling place door,” Breemer replied.

The justices, hearing an appeal by the conservative activists of a lower court ruling upholding the law, posed tough questions to both sides.

Conservative Justice Samuel Alito appeared the most hostile to the law. He wondered about a shirt emblazoned with a gay rights rainbow flag, or the National Rifle Association, or “Parkland Strong,” referring to the Feb. 14 mass shooting at a Parkland, Florida high school.

“It’s an invitation for arbitrary enforcement and enforcement that’s not even-handed,” Alito said.

The state has argued that the law, in place since 1912, is needed more than ever in the current polarized political environment to guard against Election Day arguments and violence at polling places and to protect voters from intimidation. State election officials have interpreted it as also barring campaign literature and material from groups with political views.

‘SHOCKING IMAGES’

Chief Justice John Roberts, a conservative, asked questions that signaled his sympathy for maintaining decorum in the polling place and avoiding psychological pressure on voters.

“A picture can be worth a thousand words, and people’s apparel can convey very strong and shocking images,” Roberts told Breemer.

But Roberts also suggested to the attorney defending Minnesota’s law, Daniel Rogan, that the statute seemed overly broad. Rogan said Minnesota’s law has been in place for more than 100 years with no problems.

The challengers, including the St. Paul-based Minnesota Voters Alliance and its executive director Andy Cilek, said merely wearing apparel with political messages is an inherently peaceful form of expression.

Delaware, Kansas, Montana, New Jersey, New York, Tennessee, Texas, Vermont and South Carolina have similar restrictions at polling places, according to the plaintiffs.

In Minnesota, voters wearing political apparel are asked to cover up or remove offending items. If they refuse, they may still vote, but their names are to be taken down for possible prosecution. The state said it has no record of any prosecutions under the law.

Kennedy said the law’s enforcement could be “more disruptive than wearing the shirt.”

Kagan told Rogan that “you talk about the decorum, the solemnity” of a polling place. “Makes it sound a little bit church-like,” Kagan said.

“Why isn’t it just the culmination of what is often a rowdy political process?” Kagan asked.

A ruling is due by the end of June.

Minnesota’s law is similar to one in Tennessee, upheld by the Supreme Court in 1992, that bars the display or distribution of campaign materials and voter solicitation within 100 feet (30 meters) of a polling place, Minnesota noted in court papers.

Cilek said he was twice turned away from his polling site in 2010 for wearing a T-shirt touting the conservative Tea Party movement with the words “Don’t Tread on Me” as well as a button stating “Please I.D. Me” that alluded to voter-identification laws backed by many Republicans. He eventually was allowed to vote.

The St. Louis-based 8th U.S. Circuit Court of Appeals upheld the Minnesota restrictions in 2013 and 2017.

Cilek’s group was represented by the conservative Pacific Legal Foundation but also was backed by the American Civil Liberties Union, which warned against giving poll workers discretion to decide what is impermissibly political.