The off-duty city corrections officer who accidentally shot himself and a lady friend as he was showing off his gun at a Midtown restaurant has been charged, police said Wednesday.

Mario Carrillo, 56, was hit with assault and reckless endangerment charges, hours after the accidental shooting at Mamasita Bar & Grill on Tenth Avenue near W. 54th Street on Tuesday night.

Carrillo was hanging with a 29-year-old woman, identified by sources as Lisa Mojica, at around 8 p.m. when he whipped out his service weapon and began showing it to her in an attempt to impress her.

Surveillance video from inside the eatery shows the jailer flaunting the gun in front of the woman before racking the slide and removing the magazine.

The gun then discharged a round which struck Carrillo in his left finger and Mojica in the right foot, police said.

They were both taken to Bellevue Hospital with minor injuries.