A quick-handed NYPD sergeant stopped a violent felon from shooting him in the gut by jamming his ring finger under the hammer of the felon’s .38 revolver, cops said today.

Sgt. Michael Miller and Officer William Reddin were on patrol when they noticed a livery cab speeding eastbound on Quincy Street near Malcolm X Boulevard at about 4 a.m. today. The plainclothes cops pulled the beige Lincoln Towncar over, but when they walked up displaying their shields they noticed that one of the passengers in the back seat, Eugene Graves, was making suspicious movements near his waistband.

After the cops told the passengers to get out of the car, Miller, a 13-year-veteran, reached towards a bulge at Graves’ waist and felt the gun underneath his clothes.

“He told him to put his hands behind him, and that’s when he started to fight,” said a police source.

Reddin, a four-year-veteran, rushed to help Miller, calling for backup as he ran, while Graves’ backseat confederate took off.

Graves managed to press his Taurus .38 revolver into Miller’s stomach, but Miller grabbed hold of the gun, wedging his right ring finger between the gun’s hammer and cylinder, before the murderous Graves could fire a shot.

“This guy pulled the trigger so many times he broke the sergeant’s finger,” said the police source.

Uniformed police officers arrived within moments and helped to subdue the still struggling Graves, who was also found to be in possession of about two ounces of crack, according to a police source.

He has been charged with attempted murder of a police officer, assaulting a police officer, criminal possession of a weapon, criminal possession of a controlled substance, menacing, and resisting arrest.

This isn’t the first legal trouble for Graves, who lives just four blocks from where he was pulled over. He has served time for murder in the second degree, robbery, forgery, and criminal possession of a weapon according to a police source.

Miller was taken to Wyckoff Hospital, where he received treatment for his broken finger.