Three plainclothes police officers fired at a man who allegedly pulled a gun on them near the NYCHA Farragut Houses and the Brooklyn Navy Yard yesterday afternoon. The man was shot in the hand; charges are pending.

According to the NYPD, the confrontation occurred at 3:45 p.m., when four plainclothes cops in an unmarked car were traveling south on Gold Street and "encountered a wanted male" on the side of Sands Street." Here's an excerpt from the official police version of the incident:

As the officers approached him, they observed another male with the individual pull a firearm from his waistband. The officers engaged the individual by withdrawing their weapons and three of the four officers discharged their weapons at the armed subject. The male fled the location on foot into a building at 237 Nassau Street. A subsequent search of the building located the subject inside a 3rd floor apartment where he was apprehended without further incident.

The man was taken to Kings County Hospital, where he's in stable condition. Police are currently obtaining a search warrant for the apartment.

Assistant Chief Jeffrey Maddrey said that the armed man fired at the officers first. One woman told the Daily News reports that the officers "fired over the head of her 5-year-old daughter."

Police shared video of the two men fleeing into 237 Nassau Street, which is a Farrgut Houses building.

The man initially of interest to police was also arrested. Earlier this week, police fatally shot a man during a traffic stop; the NYPD says the slain man was reaching for a gun.