A man was cornered by cops inside a Brooklyn bodega, where an officer is seen on video hitting him in the face while trying to subdue him for stealing oregano, according to sources.

Thomas Jennings was busted at Raslin Grocery in Bedford-Stuyvesant on July 7 after he grabbed some oregano shakers and a slice of pizza from a nearby fried-chicken joint and fled, according to police sources.

Images from inside the bodega show one officer attempting to detain Jennings, who was allegedly resisting arrest. A second officer arrived and is seen hitting Jennings, who seemed to have his hands up — and who has two open warrants and 20 prior arrests, sources said.

NYPD Internal Affairs is reviewing the incident and has watched the video footage, cops said.

Police sources said Jennings, who has a pending lawsuit against the city for a previous run-in with cops, had refused officers’ instructions.

The suspect was charged with robbery, resisting arrest and criminal possession of a weapon with intent to use. He was released after Brooklyn DA Ken Thompson did not convene a grand jury. He still faces charges and is due back in court in January.

Jennings has not sued over this incident.

In the earlier run-in, he claims he was “tackled, kicked and punched” by officers after a dispute with his girlfriend last year.

A lawyer for Jennings did not return a request for comment Thursday night.

Additional reporting by Lia Eustachewich and ­Gabrielle Fonrouge