A firearm recovered from the scene of an attempted robbery...

A firearm recovered from the scene of an attempted robbery at the intersection of Monroe Street and Bedford Avenue in Brooklyn is shown in this photo from Sunday, Nov. 8, 2015. Credit: DCPI

An NYPD detective investigating an online scam shot and wounded a 20-year-old man in Brooklyn Sunday night after the man flashed a gun, police said.

A police spokesman said three plainclothes detectives were at Bedford Avenue and Monroe Street when three men attempted to rob the officers about 6:40 p.m. Police said the 20-year-old "displayed a firearm" prompting the unnamed officer to "discharge" his gun, striking the man in his torso.

Police said the three men were running a scam, posting apartment rentals on Craigslist and then robbing prospective tenants who arrived to view the nonexistent rentals.

The 20-year-old man was taken to Kings County Hospital Center and is in stable condition, police said. The detective was transported to New York Methodist Hospital and treated for ringing in the ears.

Police said they arrested a 27-year-old man, but were still searching for the third suspect late Sunday night.

The NYPD said a firearm was recovered. It was identified as a Daisy Powerline 415 BB gun.

Invasive fish in Suffolk pond ... What's in store with the weather ... H.S. plays of the week  Credit: Newsday

Updated 20 minutes ago Suozzi vs. Trump on 'slush fund' ... Rare tick virus on LI ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week

Invasive fish in Suffolk pond ... What's in store with the weather ... H.S. plays of the week  Credit: Newsday

Updated 20 minutes ago Suozzi vs. Trump on 'slush fund' ... Rare tick virus on LI ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME