A Bay Area restaurant owner’s Twitter declaration that he will refuse service to anyone wearing a red Make America Great Again baseball cap was met with a mixed reaction from some of his diners this week.

“It hasn’t happened yet, but if you come to my restaurant wearing a MAGA cap, you aren’t getting served, same as if you come in wearing a swastika, white hood, or any other symbol of intolerance and hate,” tweeted J. Kenji López-Alt, the chef-partner of Wursthall in San Mateo, on Sunday. As of Wednesday afternoon, the post had more than 2,100 likes and more than 200 retweets.

Not only does the policy spark questions about refusing service to diners based on political belief, it also comes during heightened debate over MAGA caps, sold on Trump’s campaign website for $25 apiece.

The hats — which were worn by some of the Kentucky high school students who ignited a national controversy over their behavior at an indigenous people’s march this month in Washington, D.C. — have become a cultural symbol that, for some, connotes meaning beyond political disagreement.

The Tennessean newspaper on Wednesday ran a guest column by social media strategist Ryan Moore, who explained why he wears his MAGA hat almost everywhere.

“Many people have wished me dead, made threats and often call me racist simply because I support the wall and the President of the United States,” Moore wrote. “The color of a person’s skin has absolutely nothing to do with immigration or the wall. It is the Democrats who are obsessed with ‘people of color’ and gender. Republicans look at people for who they are not for their gender or skin color.”

López-Alt disagrees.

“MAGA hats are like white hoods except stupider because you can see exactly who is wearing them,” he said in a separate tweet to his 42,400 Twitter followers.

López-Alt, an award-winning cookbook author, declined to comment further, citing concern for his staff’s safety. He acknowledged that the business has received negative, even threatening, emails since the tweet.

Such stands have been debated around the country. Last year, the Red Hen restaurant in Lexington, Va., made national headlines when the management asked White House Press Secretary Sarah Huckabee Sanders to leave. Sanders said she was denied service because she worked for the Trump administration; the restaurant’s owner said Sanders was asked to leave because she supported the president’s controversial policies.

At a table inside Wursthall, San Mateo resident Jamie Hwang, 42, said she was dining at the restaurant for the second time since its 2018 debut.

“I was here when it first opened,” she said. “I follow Kenji on social media, so I knew it was a place I had to come.”

She said was unsure what to make of López-Alt’s policy on MAGA hats. San Mateo has a diverse community, she said, adding that members of her own family support Trump.

“I see where he’s coming from, but I don’t think you should just keep people out because of a hat,” Hwang said. “I get that idea, that maybe that hat could mean the person wearing it is just looking for a fight, but just cutting off dialogue, not giving a chance to get to know someone — I just don’t know if that’s something I would do.”

Esther Shek, 39, who dined with Hwang on Wednesday afternoon, agreed that López-Alt’s view was understandable.

Particularly in the wake of the Jan. 18 confrontation between the MAGA-hat-wearing teenagers and an American Indian elder near the Lincoln Memorial, she said she believed the hats had “come to represent racism, intolerance, exclusivity.”

But refusing to serve Trump supporters, she said, is “what the right wants. They already feel like they’re being demonized by what they call the liberal elite. We shouldn’t add fire to that. Instead, it should be us creating a dialogue, leaving a space open to discuss the issues.”

Though López-Alt’s policy may be the most dramatic stance a Bay Area restaurant has taken, he isn’t the first chef in the region to mix personal politics into business.

In 2017, spurred by Trump’s hard-line immigration views, dozens of local restaurants and bars registered as sanctuary businesses, including Alfred’s Steakhouse in San Francisco, Cancun Sabor Mexicano in Berkeley and Flea Street Cafe in Menlo Park. The largely symbolic move — billed as promoting safe, tolerant spaces for workers, customers and employers — provided insight into the businesses’ political beliefs. There was also some backlash as several of the sanctuary businesses were criticized online by conservatives.

At a table near the Wursthall kitchen, Bryan Agbayani, 30, of Sunnyvale said he has friends who lean both left and right. López-Alt’s rule, he said as he dined with family members, could alienate potential customers.

“I don’t think it matters to me about the rule, but the hat doesn’t just tell you all about the person,” he said. “All people are different. It’s just weird, to me, at least, that he would make it part of this business.”

Agbayani’s 28-year-old brother, Bao, who was visiting from the Philippines, said the rule banning MAGA hats wouldn’t keep him from the restaurant. But he said he was alarmed by what the rule represented.

“You’re discriminating against those with different political views,” he said. “That’s just not OK.”

Justin Phillips is a San Francisco Chronicle staff writer. Email: jphillips@sfchronicle.com Twitter: @JustMrPhillips