Gurvinder Grewal, a recent Stony Brook graduate, went out to meet pals after midnight Saturday night at Harbor Grill in Port Jefferson. But the Sikh 23-year-old was “embarrassed” when security didn’t let him in wearing his religious headwear.

“I felt shocked, embarrassed and hurt,” Grewal told The Post. “I never encountered a situation where I was refused a service or entry into an establishment for wearing a turban.”

A Harbor Grill manager told Grewal that he would not be allowed in with a head covering.

“[He was] wearing what would be more widely perceived as the slang term ‘dew rag’ or a ‘stocking cap’ and not a traditional turban,” the restaurant wrote in a lengthy Facebook comment after residents expressed outrage.

Grewal’s license shows him wearing the same style of religious turban.

“I explained to the manager that it was a turban and I wore it to practice my religion. However, he kept telling me that it was the owner’s policy,” Grewal told The Post. “I explained that I just wanted to hang out with some friends for the night and even went to the back of the line to try and explain my situation again a second time, which still did not work.”

The fine-dining spot with waterfront views enforces a dress code after 10 p.m. on Friday and Saturday nights. The rules restrict all headwear, the Port Times Record reported. The manager told Grewal it was a new policy.

“We do not allow hats or headwear in order to more capably identify people inside the establishment,” the restaurant wrote.

The restaurant said that Harbor Grill “embraces people of all races and religions,” and does not discriminate against anyone for their creed or color.

“We sincerely apologize for any distress that this incident may have caused. Please know that our weekend dress code policy is in place for the safety of all of our patrons,” the restaurant wrote. “Anyone wearing any type of hat is welcome during normal restaurant hours.”

Grewal told The Post that Port Jefferson Mayor Margot Garant apologized to him for the incident and advised him on actions to take on the issue. Grewal tried to obtain a police report today at a Suffolk County precinct but was told “it was a civil matter, not a criminal matter,” he said.

“The officer recommended I contact a civil attorney or the ACLU,” Grewal said. “I plan to reach out to them today or tomorrow.”

Grewal, who works at City MD, volunteers as an EMT at Stony Brook, he said.

“We often are requested to cover some calls in Port Jefferson, so I was hurt to find out that I wouldn’t be allowed to enter an establishment in the community I serve,” he said. “Throughout my life, I’ve faced verbal abuse and bullying about my appearance, mostly throughout school. However, my basic freedoms of entering public accommodations was never infringed upon.”