A Central Texas man was arrested this week after wearing a Donald Trump hat and T-shirt to an early-voting location.

Brett Bartlett Mauthe (Comal County Jail)

Brett Bartlett Mauthe, 55, was charged with electioneering after going to cast his ballot at a polling place in Bulverde, about 25 miles north of San Antonio.

State law prohibits "the posting, use, or distribution of political signs or literature" within 100 feet of a polling place — and this includes clothes, Comal County elections coordinator Cynthia Jaqua told the San Antonio Express-News.

Mauthe told KSAT-TV that he was wearing a Trump hat and a shirt that displayed the words "basket of deplorables" — a phrase that Democratic nominee Hillary Clinton used to refer to some of her Republican rival's supporters.

Mauthe said he took off the hat after an elections official asked him to, but he refused to turn his shirt inside-out. He added that he didn't know it was illegal to wear political attire to a polling place.

"You cannot express views for or against a candidate or political party by wearing buttons, T-shirts, hats, whatever else or carrying signs," Jaqua told the Express-News.

She said it's rare for someone to be arrested on an electioneering charge.

"Every election we have to advise people. … They wear candidates' shirts and we just have to remind them. 'Please go into the restroom and turn it inside out,'" she said. "This is the first time I recall someone getting arrested."

Mauthe was released from the Comal County Jail after posting $500 bond. If convicted of electioneering, a class C misdemeanor, he faces a fine of up to $500.