A man is in police custody after investigators say he fired a gun into the air outside a public housing development in Brooklyn.

The NYPD says at 10 p.m. Friday, officers heard 31-year-old Joseph Deval firing this weapon, before confronting him in the parking lot of the Van Dyke Houses in Brownsville.

Police say they ordered Deval to drop the weapon, but he turned towards the officers, with this gun in hand. 

One officer fired two rounds in response. 

Deval was not hit, and ran off, but was caught nearby on Blake Avenue.

Investigators say he faces a slew of charges now, including two counts of assault and criminal possession of a weapon.

The officers were taken to the hospital and treated for ringing in their ears.