Brooklyn Sgt. Michael Miller ended up with only a broken finger, the New York Daily News reported Sunday.
Miller and Officer William Reddin pulled over a speeding car in the Bedford-Stuyvesant neighborhood in Brooklyn.
Police noticed one of the two passengers adjusted something in his waistband area, and asked everyone to step out of the vehicle.
Miller felt a gun during a frisk of one of the passengers and ordered him to put his hands behind his head.
The suspect, identified as Eugene Graves, 30, of Brooklyn, allegedly attacked Miller, shoving the gun against his stomach.
Miller stuck his finger between the hammer and cylinder. Graves attempted to fire several times, breaking Miller's finger, police said.
Reddin joined the struggle and helped restrain Graves.
Graves was arrested on charges of attempted murder of a police officer, criminal possession of about 2 ounces of what cops suspect to be crack cocaine, weapons possession, assaulting a police officer, menacing and resisting arrest.
Miller was at home Saturday, nursing his broken finger.
Duggar sisters unveil Christian dating rules in new book
Ohio bar shooting arrested, charged with murder