A man pepper sprayed an ex-Marine employee at a Brooklyn gun store during an attempted robbery Wednesday — and then ran off as the worker shot at him, police said.

The suspect walked into DF Brothers Sports Center on New Utrecht Ave. in Bensonhurst and asked to see some of the guns just before 11 a.m.

When the shopkeeper, identified by friends as Frank, a 60-year-old ex-US Marine, asked to see his gun permit, the suspect pulled out the Mace and sprayed him in the face.

The crook then used a hammer to smash a display case and tried to steal some of the guns inside. But he was forced to retreat when Frank came up shooting.

Police said the injured suspect ran out of the store leaving a trail of blood behind, but could not say with certainty whether he had actually been shot or if he injured himself smashing the display case.

No arrests have been made and the investigation is ongoing. Workers at the shop declined to comment on the incident.

“Frank is a really decent guy,” said pal Harry Taggart, 66.

“He’s the kind of guy you would want in your neighborhood. I’m glad he did that.

“The man doesn’t bother anybody. He respects everyone. ”

Alex Matra, 26, who is friends with the owner’s son said he ran over when he heard the commotion at the store.

“I was sad to hear this but just happy to hear the owner is OK,” he said.

“I just hope they’ll catch him so he can’t harm anyone else. He is licensed to carry.”