The U.S. Supreme Court has struck down a Minnesota law prohibiting voters from wearing political garments or badges to the polls, a ruling likely to trickle down to Texas.

In a 7-2 ruling, the majority said Thursday that free speech rights trump the state’s goal of maintaining order and decorum in polling places.

Still, the language of the ruling seems to leave open the possibility for Minnesota — and the roughly 10 states, including Texas, with similar laws on the books — to rewrite the provision more narrowly. The court said that Minnesota’s law served a “permissible objective,” but it was too broad to be reasonably enforced.

“Casting a vote is a weighty civic act, and the State may reasonably decide that the interior of the polling place should reflect the distinction between voting and campaigning… But the line the State draws must be reasonable,” Chief Justice John Roberts wrote for the majority. “If a State wishes to set its polling places apart as areas free of partisan discord, it must employ a more discernible approach than the one offered by Minnesota here.”

The case started in 2010, when Minnesota voter Andy Cilek arrived to his Hennepin County polling place wearing a Tea Party T-shirt that read “Don’t Tread on Me” as well as a “Please I.D. Me” button — an apparent comment on Republican-championed voter identification laws in the state. He sued after an election worker said he would have to take off or cover the messages in order to vote.

The Minnesota law struck down Thursday is quite similar to the statute in place in Texas, though the court said other states' laws, including Texas', offer "more lucid terms." While the high court didn’t rule directly on Texas’ law, any similar incidents at polling places in Texas could spark a court fight.

Texas officials said the state law remains in effect. It's "more narrowly tailored" than Minnesota's version, said Sam Taylor, a spokesman for the Secretary of State's office.

Minnesota law prohibits voters from wearing a “political badge, political button, or other political insignia or about the polling place” on election days; a similar prohibition in Texas says “a person may not wear a badge, insignia, emblem, or other similar communicative device relating to a candidate, measure, or political party appearing on the ballot, or to the conduct of the election.”

Central to the case was the question of what, exactly, constitutes political messaging. At oral arguments, justices struggled to draw the line between what would be permissible and what would not be — a T-shirt with a rainbow flag? A hat flashing #MeToo?

In Texas, election judges at polling places have the power to decide whether a garment or accessory violates the anti-electioneering law.

“A rule whose fair enforcement requires an election judge to maintain a mental index of the platforms and positions of every candidate and party on the ballot is not reasonable,” Roberts said. “The discretion election judges exercise in enforcing the ban must be guided by objective, workable standards.”

In recent years, several Texans have run afoul of the state’s law. In Williamson County in 2012, a woman was told she had to change out of or cover up her “Vote the Bible” shirt in order to vote. In 2016, a San Antonio man was held at the Comal County Jail in New Braunfels on electioneering charges because he wore a T-shirt and hat supporting Donald Trump. He took off the hat but would not remove his “Basket of Deplorables” T-shirt, leading to his arrest.