A retired NYPD detective says a woman punched him in the face in Nashville over the weekend because his hat looked like a MAGA cap.

Staten Island resident Daniel Sprague told the Post he was celebrating his 50th birthday with his wife and friends at The Stage on Broadway on Friday when he was assaulted by a woman he didn’t know.

“I was outside with my friends when some grabbed me from behind, spun me around and punched me in the face,” said Sprague, who retired from the NYPD in 2009.

“At first I thought it was a friend until I got hit. I couldn’t believe someone could get that upset.”

In reality, his cap was emblazoned with the words “Make Fifty Great Again” — while his shirt was decorated with an American flag that read “Making America Great Since 1970.”

The bar’s bouncers booted them both from the property before he had a chance to call cops, but he filed a report the following day, he said.

“All night people were giving me thumbs up, smiles or some showing rage, until they walked up close and saw what hat said,” he recalled. “Then they would wish me a happy birthday.”

He was baffled by the vitriol and said he showed respect for politicians he didn’t like.

“I love Trump, but I wouldn’t hit someone who had a Bernie hat on,” said Sprague, who spent more than two decades on the NYPD and retired as a member of the elite Emergency Service Unit.

“Everyone is entitled to their opinion. I wasn’t an Obama fan but if he walked into a place where I was, I would show him and the office respect.”

The Metropolitan Nashville Police Department confirmed that they took a report on the incident.

“Suspect grabbed his hat from his head and punched him in the face,” according to the report. “He stated that when the suspect hit him in the face, he did not hit her back.”

Sprague recounted the incident on Facebook and said that he was waiting to hear back from detectives.

He also instructed readers not to react to negative comments on the post, because it might be one of his friends “breaking my chops because we have a great relationship and sense of humor.

“If it happens to be a fool or misguided snow flake’s comment, by arguing with them it will only encourage them to believe they know what they are talking about,” he wrote.