A Manhattan judge on Wednesday threw out a case alleging that a New York City bar illegally discriminated against a customer who wore a "Make America Great Again" hat.

Manhattan Supreme Court Justice David Cohen ruled that the law doesn’t protect people from political discrimination, meaning the West Village bar did not overstep its bounds in kicking out the customer, The New York Post reported.

Philadelphia accountant Greg Piatek had said he went to the bar in January 2017, shortly after Trump entered office, and was told to leave after he complained about the staff’s service.

ADVERTISEMENT

He then sued, claiming the incident “offended his sense of being an American,” according to the Post.

The bar's lawyer pointed out in court that only religious beliefs, not political ones, were protected under state and local discrimination laws.

Piatek’s lawyer, Paul Liggieri, then said his client had worn the hat “because he was visiting the 9/11 Memorial.”

“He was paying spiritual tribute to the victims of 9/11. The 'Make America Great Again' hat was part of his spiritual belief,” Liggieri claimed.

“Rather than remove his hat, instead he held true to his spiritual belief and was forced from the bar,” the lawyer added.

When the judge questioned how the bar’s staff was supposed to know about Piatek's religious beliefs, Liggieri said they could do so based on the hat.

In throwing out the case, Cohen said the "plaintiff does not state any faith-based principle to which the hat relates."

The judge said that not being served and being thrown out of the bar because of political beliefs amounted to only a “petty” slight, the Post reported.

“Here the claim that plaintiff was not served and eventually escorted out of the bar because of his perceived support for President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE is not outrageous conduct," the judge ruled.