A small-town political fight seen by some as a litmus test of President Trump’s rhetoric culminated in an election night rebuke in Solano County, where voters ousted a longtime Dixon councilman who riled the community after making antigay slurs and calling for a “straight pride” day.

The battle ended decisively: City Councilman Ted Hickman lost his bid for re-election with just 27 percent of the vote, while his opponent, Jim Ernest, swept up 73 percent. After a turbulent campaign, Dixon residents are hoping the town can go back to talking about local issues.

For Hickman, the defeat still smarts.

“I just got my butt kicked,” he told The Chronicle.

The election results and preceding protests of comments Hickman published in a local newspaper signal a change in the 20,000-person bedroom community wedged between Vacaville and Davis, with its quilt of tawny grassland, a pumpkin patch boasting the world’s longest corn maze and a mayor who moonlights as a car mechanic.

Dixon came to illustrate a larger political divide this summer, drawing attention that some residents and leaders still resent.

It all started when Hickman wrote a newspaper column that called for “Straight Pride American Month” and referred to gay people as “tinker bells” and “faries.” The statements, published in a weekly newspaper called Independent Voice, incited protests at City Council meetings and prompted some businesses to post signs in their windows declaring that people of “all races, religions, countries of origin, sexual orientations, genders” were welcome.

“A lot of people felt Dixon was being mischaracterized” by the statements of one person, said Ernest, a planning commissioner who owns Ramtown Karate, a martial arts school for children.

He added that while a small minority of residents want to grasp at nostalgia for the 1950s, many in Dixon have more progressive views.

“I guess we just seem like a little hayseed town, but we actually have a lot of educated people with pretty good jobs,” Ernest said. “UC Davis is right across the freeway.”

Hickman’s attitude does not reflect the majority of Dixon, others told The Chronicle, adding that his removal was long overdue.

“We used to say, ‘If the outside world ever got wind of some of the stuff (Hickman) was writing, boy, this was going to be embarrassing,’” said Tom Ruppel, a retiree who contributed $2,000 to Ernest’s campaign. Ruppel had only spoken to the candidate for 10 minutes over the phone when he made the donation, but that didn’t matter, he said. He was dead-set on fixing “the black eye we got” from Hickman’s words.

Others called the vote a principled stand against a politically incorrect official who may have been emboldened when Trump took office.

“Ted has always been the kind of person to hang on the edge, but he finally crossed a line to where people in the community said, ‘Enough is enough,’” said Councilman Devon Minnema, who emerged as a critic of Hickman after the flare-up.

Mayor Thom Bogue defended Hickman, pointing to his accomplishments — he pressed the city to install stoplights at deadly intersections and have police officers patrol local schools — and downplayed the “crazy statements that got so many people upset.” Even so, the mayor said he is satisfied with the election outcome and promised to work collaboratively with Ernest.

Hickman remained unapologetic throughout the summer campaign, even as residents protested outside Dixon City Hall and waved rainbow flags. Weeks after the votes were counted, he stood by his controversial remarks, insisting they had little influence over the election.

“The column didn’t help, but that wasn’t the determining factor,” Hickman said, suggesting that Ernest won because of support from hundreds of loyal karate students, and money flowing in from out of town. It seemed that every lawn and shop window was plastered with Ernest’s signs, Hickman said.

Such characterizations made Ernest bristle. He said his victory showed the town’s desire to change outside perceptions.

“People weren’t wanting to come to Dixon because they thought we were hateful and narrow-minded — and we’re just not,” he said.

Once he takes office in January, Ernest said, he hopes to attract new businesses to the small outpost just off Interstate 80. Dixon has struggled to attract investment during its long, slow turnaround from being an agricultural community to one that sends commuters northeast to Sacramento and southwest to the Bay Area. What it needs now are more jobs and development in the downtown center, Ernest said.

Hickman, meanwhile, has redirected energy toward his newspaper column, which, he said, provides a much bigger platform than a seat on a five-person council.

If anything, the election loss inspired him to be more unbridled.

“When I was an elected official, I had to be careful about what I wrote,” Hickman said. “Now I don’t have to be careful at all.”

Rachel Swan is a San Francisco Chronicle staff writer. Email: rswan@sfchronicle.com Twitter: @rachelswan