J. Kenji López-Alt (pictured) said he would refuse to serve patrons wearing MAGA hats

A California restaurant owner has backed down and lifted a ban on customers wearing MAGA hats after comparing them to a 'swastika or white hood'.

Award winning chef J. Kenji López-Alt started by apologizing to 'my staff and partners' before adding Wursthall Restaurant & Bierhaus 'will continue, as it always has, to serve all customer'.

López-Alt, who is a partner at the restaurant in San Mateo, south of San Francisco, deleted his tweet from Sunday which had compared the hats popularized by President Donald Trump to a swastika or white hood.

He wrote: '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.'

The chef, who has more than 40,000 followers, followed up with: 'MAGA hats are like white hoods except stupider because you can see exactly who is wearing them.'

But in a statement on the Medium website Friday he said that his political opinions will not interfere with service.

He said that his mother is an immigrant from Japan and his father is from Pennsylvania. He said his family includes people on every side of the political spectrum.

López-Alt wrote: 'Unfortunately the way I tried to communicate this ended up only amplifying the anger, and I apologize for that.

'I want to start by apologizing to my staff and partners at Wursthall. Making a public statement without taking my team’s thoughts into consideration was disrespectful and reckless.

'Wursthall will continue, as it always has, to serve all customer regardless of race, color, religion, sex, national origin, sexual preference, gender orientation, disability, or political opinion — so long as they leave hate, anger, and violence outside of the doors of our restaurant.'

Award winning chef J. Kenji López-Alt's letter of apology in full

Customers dine at the Wursthall Restaurant & Bierhaus in San Mateo in 2018

Award-winning cookbook author J. Kenji Lopez-Alt is a chef-partner of the Wursthall restaurant in San Mateo and says in a tweet Sunday that he views the hats as symbols of intolerance and hate. He has since reversed his ban

He said the tweet was his personal perspective, not restaurant policy. He added: 'After having seen the red hat displayed so prominently in so many moments of anger, hate, and violence, to me -and many others - the hat began to symbolize exactly that: anger, hate, and violence.'

According to the San Francisco Chronicle, the tweet from Sunday had more than 2,000 likes by Wednesday afternoon.

López-Alt , who written a New York Times bestseller called 'The Food Lab: Better Home Cooking Through Science, had refused to change his mind despite threatening emails, Fox News reports.

But one customer said: 'You’re discriminating against those with different political views. That’s just not OK.'

Another added: 'The right] 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.'

President Donald Trump, pictured in 2017, hands a signed "Make America Great Again," hat back to a supporter in Reno, Nev

Since Donald Trump's presidential campaign, red 'MAGA' caps have become a divisive symbol in the United States.

People who wear them often say they do so to show patriotism and outward support for the president.

Others say the hats promote the hate and racism that they believe Trump fosters.

The hats, which are sold for $25 on Trump's campaign website, sparked widespread debate earlier this month after an incident involving an indigenous marcher and a group of high school boys wearing MAGA caps in Washington D.C.

After the incident, actress and acitviist Alyssa Milano tweeted 'The red MAGA hat is the new white hood' and later said she wouldn't apologize for the remark.

Last year, the Red Hen restaurant in Lexington, Virginia, made national headlines when 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.