Kicking a Trump supporter out of a bar is allowed because political discrimination is not protected under the law, a Manhattan judge ruled on Wednesday.

Greg Piatek of Philadelphia claimed the staff of the Happiest Hour on 10th Street in New York City’s West Village kicked him out of the establishment in January 2017 for donning a “Make America Great Again” hat, the New York Post reported.

“Anyone who supports Trump — or believes in what you believe — is not welcome here! And you need to leave right now because we won’t serve you!” Piatek claimed the staff told him after he and his buddies complained about rude service a bartender gave them.

Piatek decided to sue the Happiest Hour in Manhattan Supreme Court, alleging the staff “offended his sense of being American.”

At Wednesday’s hearing, the attorney representing the bar argued that state and local discrimination laws only protected people’s religious beliefs and not political beliefs.

“Supporting Trump is not a religion,” said Elizabeth Conway, who was representing the Happiest Hour.

Piatek’s attorney snapped back, arguing that his hat paid “spiritual tribute” to the 9/11 memorial victims because Piatek and his friends had visited the site before frequenting the bar.

“He was paying spiritual tribute to the victims of 9/11. The Make America Great Again hat was part of his spiritual belief,” Piatek’s attorney Paul Liggieri told Justice David Cohen in court Wednesday. “Rather than remove his hat, instead he held true to his spiritual belief and was forced from the bar.”

When the judge questioned Liggeri about how the staff could know about Piatek’s religious beliefs, Liggeri responded that the hat was the indicator.

Nearly an hour later, Justice David Cohen announced he would be throwing out the case.

“Plaintiff does not state any faith-based principle to which the hat relates,” Cohen said. “Here, the claim that plaintiff was not served and eventually escorted out of the bar because of his perceived support for President Trump is not outrageous conduct.”

Other Trump supporters in New York City have made headlines for being physically and verbally attacked for sporting hats with Trump’s campaign slogan.

In June 2017, a Brooklyn man was assaulted for wearing a MAGA hat and suffered multiple injuries to his face requiring plastic surgery to fix.

A Bronx man was attacked by two men on a subway after they asked if he supported Trump shortly after the 2016 election in November.

In March 2017, a New York Post journalist wore a MAGA hat as a self-described “social experiment” and was cursed out by various people he encountered in New York City.