A man was asked to leave a Tesco Express for wearing a flat cap.
Graham Cattermole was told by a security guard to remove it in a "no hoodies or crash helmets policy" at the store in Upper Gornal, West Midlands, as the Dudley News reported.
The 64-year-old - who had just set foot through the door - refused and left without buying his weekly shopping with wife Christine, 61, on Tuesday.
He complained to Tesco, who apologised "for the inconvenience caused".
Mr Cattermole said he was told about the hats policy by the shop's security guard, but argued his beige cotton cap should not apply.
The grandfather told the BBC: "It is just a ridiculous situation and my family and friends have said how stupid it is.
"I've been going into the same store wearing different hats for many years and never had a problem, until now."
You may also like:
Mr Cattermole, who walks with a stick, said he told the security guard "where to stick it".
He added: "It's not like I was wearing a hoodie or crash helmet. You can clearly see my face."
The electrician, who is a year away from retirement, said he will not return to the store.
A Tesco spokeswoman said: "We would like to apologise to our customer for the inconvenience caused and our store manager would be happy to welcome the customer into store to discuss the matter with them."
It is understood the security guard was new to the store and has since been retrained.